Exemplo n.º 1
0
 public void Patch(string id, [FromBody] MergePatchOrderShipGroupMvoDto value)
 {
     try {
         OrderShipGroupMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _orderShipGroupMvoApplicationService.When(value as IMergePatchOrderShipGroupMvo);
     } catch (Exception ex) { var response = OrderShipGroupMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Exemplo n.º 2
0
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeleteOrderShipGroupMvoDto();
         value.CommandId    = commandId;
         value.RequesterId  = requesterId;
         value.OrderVersion = (long)Convert.ChangeType(version, typeof(long));
         OrderShipGroupMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _orderShipGroupMvoApplicationService.When(value as IDeleteOrderShipGroupMvo);
     } catch (Exception ex) { var response = OrderShipGroupMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Exemplo n.º 3
0
        public void Put(string id, [FromBody] CreateOrMergePatchOrDeleteOrderShipGroupMvoDto value)
        {
            try {
                // ///////////////////////////////
                if (value.OrderVersion != default(long))
                {
                    value.CommandType = CommandType.MergePatch;
                    OrderShipGroupMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                    _orderShipGroupMvoApplicationService.When(value as IMergePatchOrderShipGroupMvo);
                    return;
                }
                // ///////////////////////////////

                OrderShipGroupMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                _orderShipGroupMvoApplicationService.When(value as ICreateOrderShipGroupMvo);
            } catch (Exception ex) { var response = OrderShipGroupMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }