コード例 #1
0
 public void Patch(string id, [FromBody] MergePatchSellableInventoryItemEntryMvoDto value)
 {
     try {
         SellableInventoryItemEntryMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _sellableInventoryItemEntryMvoApplicationService.When(value as IMergePatchSellableInventoryItemEntryMvo);
     } catch (Exception ex) { var response = SellableInventoryItemEntryMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
コード例 #2
0
        public void Put(string id, [FromBody] CreateOrMergePatchOrDeleteSellableInventoryItemEntryMvoDto value)
        {
            try {
                // ///////////////////////////////
                if (value.SellableInventoryItemVersion != default(long))
                {
                    value.CommandType = CommandType.MergePatch;
                    SellableInventoryItemEntryMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                    _sellableInventoryItemEntryMvoApplicationService.When(value as IMergePatchSellableInventoryItemEntryMvo);
                    return;
                }
                // ///////////////////////////////

                SellableInventoryItemEntryMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                _sellableInventoryItemEntryMvoApplicationService.When(value as ICreateSellableInventoryItemEntryMvo);
            } catch (Exception ex) { var response = SellableInventoryItemEntryMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }