コード例 #1
0
 public void Patch(string id, [FromBody] MergePatchShipmentPackageContentMvoDto value)
 {
     try {
         ShipmentPackageContentMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _shipmentPackageContentMvoApplicationService.When(value as IMergePatchShipmentPackageContentMvo);
     } catch (Exception ex) { var response = ShipmentPackageContentMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
コード例 #2
0
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeleteShipmentPackageContentMvoDto();
         value.CommandId              = commandId;
         value.RequesterId            = requesterId;
         value.ShipmentPackageVersion = (long)Convert.ChangeType(version, typeof(long));
         ShipmentPackageContentMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _shipmentPackageContentMvoApplicationService.When(value as IDeleteShipmentPackageContentMvo);
     } catch (Exception ex) { var response = ShipmentPackageContentMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
コード例 #3
0
        public void Put(string id, [FromBody] CreateOrMergePatchOrDeleteShipmentPackageContentMvoDto value)
        {
            try {
                // ///////////////////////////////
                if (value.ShipmentPackageVersion != default(long))
                {
                    value.CommandType = CommandType.MergePatch;
                    ShipmentPackageContentMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                    _shipmentPackageContentMvoApplicationService.When(value as IMergePatchShipmentPackageContentMvo);
                    return;
                }
                // ///////////////////////////////

                ShipmentPackageContentMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                _shipmentPackageContentMvoApplicationService.When(value as ICreateShipmentPackageContentMvo);
            } catch (Exception ex) { var response = ShipmentPackageContentMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }