コード例 #1
0
 public void Patch(string id, [FromBody] MergePatchOrderItemShipGroupAssociationMvoDto value)
 {
     try {
         OrderItemShipGroupAssociationMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _orderItemShipGroupAssociationMvoApplicationService.When(value as IMergePatchOrderItemShipGroupAssociationMvo);
     } catch (Exception ex) { var response = OrderItemShipGroupAssociationMvosControllerUtils.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 DeleteOrderItemShipGroupAssociationMvoDto();
         value.CommandId    = commandId;
         value.RequesterId  = requesterId;
         value.OrderVersion = (long)Convert.ChangeType(version, typeof(long));
         OrderItemShipGroupAssociationMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _orderItemShipGroupAssociationMvoApplicationService.When(value as IDeleteOrderItemShipGroupAssociationMvo);
     } catch (Exception ex) { var response = OrderItemShipGroupAssociationMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
コード例 #3
0
        public void Put(string id, [FromBody] CreateOrMergePatchOrDeleteOrderItemShipGroupAssociationMvoDto value)
        {
            try {
                // ///////////////////////////////
                if (value.OrderVersion != default(long))
                {
                    value.CommandType = CommandType.MergePatch;
                    OrderItemShipGroupAssociationMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                    _orderItemShipGroupAssociationMvoApplicationService.When(value as IMergePatchOrderItemShipGroupAssociationMvo);
                    return;
                }
                // ///////////////////////////////

                OrderItemShipGroupAssociationMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                _orderItemShipGroupAssociationMvoApplicationService.When(value as ICreateOrderItemShipGroupAssociationMvo);
            } catch (Exception ex) { var response = OrderItemShipGroupAssociationMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }