public async Task <IHttpActionResult> PutShipper(string id, Shipper shipper) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != shipper.TransNo) { return(BadRequest()); } try { await _SVC.UpdateShipper(shipper); } catch (DbUpdateConcurrencyException) { if (!ShipperExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
async public Task <ActionResult> Update(Shipper item) { return(Content(await _Service.UpdateShipper(item))); }