public async Task <IActionResult> PutShipping([FromRoute] int id, [FromBody] Shipping shipping) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != shipping.Id) { return(BadRequest()); } _context.Entry(shipping).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ShippingExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }