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