Esempio n. 1
0
 public void Patch(string id, [FromBody] MergePatchOrderShipmentDto value)
 {
     try {
         OrderShipmentsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _orderShipmentApplicationService.When(value as IMergePatchOrderShipment);
     } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Esempio n. 2
0
        public void Put(string id, [FromBody] CreateOrMergePatchOrDeleteOrderShipmentDto value)
        {
            try {
                // ///////////////////////////////
                if (value.Version != default(long))
                {
                    value.CommandType = CommandType.MergePatch;
                    OrderShipmentsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                    _orderShipmentApplicationService.When(value as IMergePatchOrderShipment);
                    return;
                }
                // ///////////////////////////////

                OrderShipmentsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                _orderShipmentApplicationService.When(value as ICreateOrderShipment);
            } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }