public async Task <IHttpActionResult> PutDeliveryType(string id, DeliveryType deliveryType) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != deliveryType.ID) { return(BadRequest()); } try { await _SVC.UpdateDeliveryType(deliveryType); } catch (DbUpdateConcurrencyException) { if (!DeliveryTypeExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
async public Task <ActionResult> Update(DeliveryType item) { return(Content(await _Server.UpdateDeliveryType(item))); }