Beispiel #1
0
        public virtual IPicklistRoleMvoState ToPicklistRoleMvoState()
        {
            var state = new PicklistRoleMvoState(true);

            state.PicklistRoleId = this.PicklistRoleId;
            if (this.Version != null && this.Version.HasValue)
            {
                state.Version = this.Version.Value;
            }
            if (this.Active != null && this.Active.HasValue)
            {
                state.Active = this.Active.Value;
            }
            state.PicklistDescription          = this.PicklistDescription;
            state.PicklistFacilityId           = this.PicklistFacilityId;
            state.PicklistShipmentMethodTypeId = this.PicklistShipmentMethodTypeId;
            state.PicklistStatusId             = this.PicklistStatusId;
            state.PicklistPicklistDate         = this.PicklistPicklistDate;
            state.PicklistPickwaveId           = this.PicklistPickwaveId;
            state.PicklistCreatedBy            = this.PicklistCreatedBy;
            if (this.PicklistCreatedAt != null && this.PicklistCreatedAt.HasValue)
            {
                state.PicklistCreatedAt = this.PicklistCreatedAt.Value;
            }
            state.PicklistUpdatedBy = this.PicklistUpdatedBy;
            if (this.PicklistUpdatedAt != null && this.PicklistUpdatedAt.HasValue)
            {
                state.PicklistUpdatedAt = this.PicklistUpdatedAt.Value;
            }
            if (this.PicklistActive != null && this.PicklistActive.HasValue)
            {
                state.PicklistActive = this.PicklistActive.Value;
            }
            if (this.PicklistDeleted != null && this.PicklistDeleted.HasValue)
            {
                state.PicklistDeleted = this.PicklistDeleted.Value;
            }
            if (this.PicklistVersion != null && this.PicklistVersion.HasValue)
            {
                state.PicklistVersion = this.PicklistVersion.Value;
            }
            state.CreatedByUserLogin = this.CreatedByUserLogin;
            if (this.CreatedAt != null && this.CreatedAt.HasValue)
            {
                state.CreatedAt = this.CreatedAt.Value;
            }
            state.LastModifiedByUserLogin = this.LastModifiedByUserLogin;
            if (this.UpdatedAt != null && this.UpdatedAt.HasValue)
            {
                state.UpdatedAt = this.UpdatedAt.Value;
            }

            return(state);
        }
Beispiel #2
0
        public virtual void Initialize(IPicklistRoleMvoStateCreated stateCreated)
        {
            var aggregateId = stateCreated.PicklistRoleMvoEventId.PicklistRoleId;
            var state       = new PicklistRoleMvoState();

            state.PicklistRoleId = aggregateId;
            var aggregate = (PicklistRoleMvoAggregate)GetPicklistRoleMvoAggregate(state);

            var eventStoreAggregateId = ToEventStoreAggregateId(aggregateId);

            aggregate.Apply(stateCreated);
            Persist(eventStoreAggregateId, aggregate, state);
        }
Beispiel #3
0
 public static CreatePicklistRoleMvo ToCreatePicklistRoleMvo(this PicklistRoleMvoState state)
 {
     return(state.ToCreatePicklistRoleMvo <CreatePicklistRoleMvo>());
 }
Beispiel #4
0
 public static MergePatchPicklistRoleMvo ToMergePatchPicklistRoleMvo(this PicklistRoleMvoState state)
 {
     return(state.ToMergePatchPicklistRoleMvo <MergePatchPicklistRoleMvo>());
 }
Beispiel #5
0
 public static DeletePicklistRoleMvo ToDeletePicklistRoleMvo(this PicklistRoleMvoState state)
 {
     return(state.ToDeletePicklistRoleMvo <DeletePicklistRoleMvo>());
 }
Beispiel #6
0
 public static IPicklistRoleMvoCommand ToCreateOrMergePatchPicklistRoleMvo(this PicklistRoleMvoState state)
 {
     return(state.ToCreateOrMergePatchPicklistRoleMvo <CreatePicklistRoleMvo, MergePatchPicklistRoleMvo>());
 }