public async Task <IActionResult> Edit(int id, [Bind("EppId,Nombre")] Epp epp) { if (id != epp.EppId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(epp); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EppExists(epp.EppId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(epp)); }
public async Task <IActionResult> Create([Bind("EppId,Nombre")] Epp epp) { if (ModelState.IsValid) { _context.Add(epp); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(epp)); }