public async Task <ActionResult <dtInvAccounts> > PostdtInvAccounts(dtInvAccounts dtInvAccounts) { _context.dtInvAccounts.Add(dtInvAccounts); await _context.SaveChangesAsync(); return(CreatedAtAction("GetdtInvAccounts", new { id = dtInvAccounts.ID }, dtInvAccounts)); }
public async Task <IActionResult> PutdtInvAccounts(int id, dtInvAccounts dtInvAccounts) { if (id != dtInvAccounts.ID) { return(BadRequest()); } _context.Entry(dtInvAccounts).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!dtInvAccountsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }