public async Task <IActionResult> Edit(int id, [Bind("ProjectId,Name")] Project project) { if (id != project.ProjectId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(project); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProjectExists(project.ProjectId)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(project)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Date,Time")] ReviewTime reviewTime) { if (id != reviewTime.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(reviewTime); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ReviewTimeExists(reviewTime.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(reviewTime)); }
public async Task <IActionResult> Edit(int id, [Bind("MemberId,Name")] Member member) { if (id != member.MemberId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(member); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MemberExists(member.MemberId)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(member)); }
public async Task <IActionResult> Edit(int id, [Bind("OutputId,ProcessOutput")] Output output) { if (id != output.OutputId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(output); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!OutputExists(output.OutputId)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(output)); }