public async Task <IActionResult> PutPurchaseOrderShipping(long id, PurchaseOrderShipping purchaseOrderShipping) { if (id != purchaseOrderShipping.Id) { return(BadRequest()); } _context.Entry(purchaseOrderShipping).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PurchaseOrderShippingExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <PurchaseOrderShipping> > PostPurchaseOrderShipping(PurchaseOrderShipping purchaseOrderShipping) { _context.PurchaseOrderShippings.Add(purchaseOrderShipping); await _context.SaveChangesAsync(); return(CreatedAtAction(nameof(GetPurchaseOrderShipping), new { id = purchaseOrderShipping.Id }, purchaseOrderShipping)); }