public async Task <IActionResult> PutInvoiceTotals(int id, InvoiceTotals invoiceTotals) { if (id != invoiceTotals.Id) { return(BadRequest()); } _context.Entry(invoiceTotals).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InvoiceTotalsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutUserItem(long id, UserItem userItem) { if (id != userItem.Id) { return(BadRequest()); } _context.Entry(userItem).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserItemExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutBillHistories(int id, BillHistories billHistories) { if (id != billHistories.Id) { return(BadRequest()); } _context.Entry(billHistories).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BillHistoriesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutFailedJobs(long id, FailedJobs failedJobs) { if (id != failedJobs.Id) { return(BadRequest()); } _context.Entry(failedJobs).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FailedJobsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutMedia(int id, Media media) { if (id != media.Id) { return(BadRequest()); } _context.Entry(media).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MediaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }