Пример #1
0
        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));
        }
Пример #2
0
 async public Task <ActionResult> Update(DeliveryType item)
 {
     return(Content(await _Server.UpdateDeliveryType(item)));
 }