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