public async Task <IActionResult> Edit(string id, [Bind("IdUf,DescUf")] SisUf sisUf) { if (id != sisUf.IdUf) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(sisUf); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SisUfExists(sisUf.IdUf)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(sisUf)); }
public async Task <IActionResult> Edit(int id, [Bind("IdMarca,DescMarca,Usacadmat,Usacadveic,Ativo")] SisMarcas sisMarcas) { if (id != sisMarcas.IdMarca) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(sisMarcas); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SisMarcasExists(sisMarcas.IdMarca)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(sisMarcas)); }