public async Task <IActionResult> Edit(int id, [Bind("ITAccountID,itaccountTypeIdentID")] ITAccount iTAccount) { if (id != iTAccount.ITAccountID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(iTAccount); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ITAccountExists(iTAccount.ITAccountID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(iTAccount)); }
public async Task <IActionResult> Create([Bind("ITAccountID,itaccountTypeIdentID")] ITAccount iTAccount) { if (ModelState.IsValid) { _context.Add(iTAccount); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(iTAccount)); }
public ITAccountDTO() { DomainModel = new ITAccount(); }