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); } }
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); } }
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); } }