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