コード例 #1
0
        public void Put(string id, [FromBody] CreateOrMergePatchOrDeleteShipmentMethodTypeDto value)
        {
            try {
                // ///////////////////////////////
                if (value.Version != default(long))
                {
                    value.CommandType = CommandType.MergePatch;
                    ShipmentMethodTypesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                    _shipmentMethodTypeApplicationService.When(value as IMergePatchShipmentMethodType);
                    return;
                }
                // ///////////////////////////////

                ShipmentMethodTypesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                _shipmentMethodTypeApplicationService.When(value as ICreateShipmentMethodType);
            } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }