예제 #1
0
 public void Patch(string id, [FromBody] MergePatchShipmentItemMvoDto value)
 {
     try {
         ShipmentItemMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _shipmentItemMvoApplicationService.When(value as IMergePatchShipmentItemMvo);
     } catch (Exception ex) { var response = ShipmentItemMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
예제 #2
0
        public void Put(string id, [FromBody] CreateOrMergePatchOrDeleteShipmentItemMvoDto value)
        {
            try {
                // ///////////////////////////////
                if (value.ShipmentVersion != default(long))
                {
                    value.CommandType = CommandType.MergePatch;
                    ShipmentItemMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                    _shipmentItemMvoApplicationService.When(value as IMergePatchShipmentItemMvo);
                    return;
                }
                // ///////////////////////////////

                ShipmentItemMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                _shipmentItemMvoApplicationService.When(value as ICreateShipmentItemMvo);
            } catch (Exception ex) { var response = ShipmentItemMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }