public virtual void Initialize(IOrderItemShipGrpInvReservationStateCreated stateCreated)
        {
            var aggregateId = stateCreated.OrderItemShipGrpInvReservationEventId.OrderItemShipGrpInvResId;
            var state       = new OrderItemShipGrpInvReservationState();

            state.OrderItemShipGrpInvResId = aggregateId;
            var aggregate = (OrderItemShipGrpInvReservationAggregate)GetOrderItemShipGrpInvReservationAggregate(state);

            var eventStoreAggregateId = ToEventStoreAggregateId(aggregateId);

            aggregate.Apply(stateCreated);
            Persist(eventStoreAggregateId, aggregate, state);
        }
        public virtual IOrderItemShipGrpInvReservationState ToOrderItemShipGrpInvReservationState()
        {
            var state = new OrderItemShipGrpInvReservationState(true);

            state.OrderItemShipGrpInvResId = this.OrderItemShipGrpInvResId;
            state.ReserveOrderEnumId       = this.ReserveOrderEnumId;
            state.Quantity             = this.Quantity;
            state.QuantityNotAvailable = this.QuantityNotAvailable;
            state.ReservedDatetime     = this.ReservedDatetime;
            state.CreatedDatetime      = this.CreatedDatetime;
            state.PromisedDatetime     = this.PromisedDatetime;
            state.CurrentPromisedDate  = this.CurrentPromisedDate;
            state.Priority             = this.Priority;
            state.SequenceId           = this.SequenceId;
            state.OldPickStartDate     = this.OldPickStartDate;
            if (this.Active != null && this.Active.HasValue)
            {
                state.Active = this.Active.Value;
            }
            if (this.Version != null && this.Version.HasValue)
            {
                state.Version = this.Version.Value;
            }
            state.CreatedBy = this.CreatedBy;
            if (this.CreatedAt != null && this.CreatedAt.HasValue)
            {
                state.CreatedAt = this.CreatedAt.Value;
            }
            state.UpdatedBy = this.UpdatedBy;
            if (this.UpdatedAt != null && this.UpdatedAt.HasValue)
            {
                state.UpdatedAt = this.UpdatedAt.Value;
            }

            return(state);
        }
Ejemplo n.º 3
0
 public static CreateOrderItemShipGrpInvReservation ToCreateOrderItemShipGrpInvReservation(this OrderItemShipGrpInvReservationState state)
 {
     return(state.ToCreateOrderItemShipGrpInvReservation <CreateOrderItemShipGrpInvReservation>());
 }
Ejemplo n.º 4
0
 public static MergePatchOrderItemShipGrpInvReservation ToMergePatchOrderItemShipGrpInvReservation(this OrderItemShipGrpInvReservationState state)
 {
     return(state.ToMergePatchOrderItemShipGrpInvReservation <MergePatchOrderItemShipGrpInvReservation>());
 }
Ejemplo n.º 5
0
 public static DeleteOrderItemShipGrpInvReservation ToDeleteOrderItemShipGrpInvReservation(this OrderItemShipGrpInvReservationState state)
 {
     return(state.ToDeleteOrderItemShipGrpInvReservation <DeleteOrderItemShipGrpInvReservation>());
 }
Ejemplo n.º 6
0
 public static IOrderItemShipGrpInvReservationCommand ToCreateOrMergePatchOrderItemShipGrpInvReservation(this OrderItemShipGrpInvReservationState state)
 {
     return(state.ToCreateOrMergePatchOrderItemShipGrpInvReservation <CreateOrderItemShipGrpInvReservation, MergePatchOrderItemShipGrpInvReservation>());
 }