public async Task <IActionResult> PutCustomers(long id, Customers customers) { if (id != customers.CustomersId) { return(BadRequest()); } _context.Entry(customers).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CustomersExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutTransaction(long id, Transaction transaction) { if (id != transaction.TransactionId) { return(BadRequest()); } _context.Entry(transaction).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TransactionExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }