public async Task <IActionResult> PutItemsDetails(int id, ItemsDetails itemsDetails) { if (id != itemsDetails.Item_Id) { return(BadRequest()); } _context.Entry(itemsDetails).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ItemsDetailsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutInvoice(int id, Invoice invoice) { if (id != invoice.Invoice_Id) { return(BadRequest()); } _context.Entry(invoice).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InvoiceExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }