public async Task <IActionResult> Create([Bind("idEstado,descripcion")] Estado estado) { if (ModelState.IsValid) { _context.Add(estado); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(estado)); }
public async Task <IActionResult> Create([Bind("idPlataforma,descripcion,numeroMaximoUsuarios,precio,idEstado")] Plataforma plataforma) { if (ModelState.IsValid) { _context.Add(plataforma); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(plataforma)); }
public async Task <IActionResult> Create([Bind("usuariosdisponibles,fechaPago,clave,idPlataforma,idCuenta")] PlataformaCuenta plataformaCuenta) { if (ModelState.IsValid) { _context.Add(plataformaCuenta); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["idCuenta"] = new SelectList(_context.CUENTA, "idCuenta", "idCuenta", plataformaCuenta.idCuenta); ViewData["idPlataforma"] = new SelectList(_context.PLATAFORMA, "idPlataforma", "idPlataforma", plataformaCuenta.idPlataforma); return(View(plataformaCuenta)); }
public async Task Save(BillycockServiceContext _context) { await _context.SaveChangesAsync(); }