Ejemplo n.º 1
0
 public void Patch(string id, [FromBody] MergePatchOrderItemShipGrpInvReservationDto value)
 {
     try {
         OrderItemShipGrpInvReservationsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _orderItemShipGrpInvReservationApplicationService.When(value as IMergePatchOrderItemShipGrpInvReservation);
     } catch (Exception ex) { var response = OrderItemShipGrpInvReservationsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Ejemplo n.º 2
0
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeleteOrderItemShipGrpInvReservationDto();
         value.CommandId   = commandId;
         value.RequesterId = requesterId;
         value.Version     = (long)Convert.ChangeType(version, typeof(long));
         OrderItemShipGrpInvReservationsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _orderItemShipGrpInvReservationApplicationService.When(value as IDeleteOrderItemShipGrpInvReservation);
     } catch (Exception ex) { var response = OrderItemShipGrpInvReservationsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Ejemplo n.º 3
0
        public void Put(string id, [FromBody] CreateOrMergePatchOrDeleteOrderItemShipGrpInvReservationDto value)
        {
            try {
                // ///////////////////////////////
                if (value.Version != default(long))
                {
                    value.CommandType = CommandType.MergePatch;
                    OrderItemShipGrpInvReservationsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                    _orderItemShipGrpInvReservationApplicationService.When(value as IMergePatchOrderItemShipGrpInvReservation);
                    return;
                }
                // ///////////////////////////////

                OrderItemShipGrpInvReservationsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                _orderItemShipGrpInvReservationApplicationService.When(value as ICreateOrderItemShipGrpInvReservation);
            } catch (Exception ex) { var response = OrderItemShipGrpInvReservationsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }