public async Task <IActionResult> Edit(int id, [Bind("Id")] SignUp signUp) { if (id != signUp.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(signUp); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!signUpExists(signUp.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(signUp)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Description")] Projetos projetos) { if (id != projetos.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(projetos); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProjetosExists(projetos.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(projetos)); }