public async Task <IActionResult> Edit(int id, [Bind("Id,Codigo,Nombre,Categoria,Descripcion")] CIE10 cIE10) { if (id != cIE10.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(cIE10); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CIE10Exists(cIE10.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(cIE10)); }
public async Task <IActionResult> Create([Bind("Id,Codigo,Nombre,Categoria,Descripcion")] CIE10 cIE10) { if (ModelState.IsValid) { _context.Add(cIE10); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(cIE10)); }