Esempio n. 1
0
        public virtual IAttributeSetInstanceExtensionFieldGroupState ToAttributeSetInstanceExtensionFieldGroupState()
        {
            var state = new AttributeSetInstanceExtensionFieldGroupState(true);

            state.Id          = this.Id;
            state.FieldType   = this.FieldType;
            state.FieldLength = this.FieldLength;
            if (this.FieldCount != null && this.FieldCount.HasValue)
            {
                state.FieldCount = this.FieldCount.Value;
            }
            state.NameFormat  = this.NameFormat;
            state.Description = this.Description;
            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);
        }
Esempio n. 2
0
        public virtual void Initialize(IAttributeSetInstanceExtensionFieldGroupStateCreated stateCreated)
        {
            var aggregateId = stateCreated.AttributeSetInstanceExtensionFieldGroupEventId.Id;
            var state       = new AttributeSetInstanceExtensionFieldGroupState();

            state.Id = aggregateId;
            var aggregate = (AttributeSetInstanceExtensionFieldGroupAggregate)GetAttributeSetInstanceExtensionFieldGroupAggregate(state);

            var eventStoreAggregateId = ToEventStoreAggregateId(aggregateId);

            aggregate.Apply(stateCreated);
            Persist(eventStoreAggregateId, aggregate, state);
        }
 public static CreateAttributeSetInstanceExtensionFieldGroup ToCreateAttributeSetInstanceExtensionFieldGroup(this AttributeSetInstanceExtensionFieldGroupState state)
 {
     return(state.ToCreateAttributeSetInstanceExtensionFieldGroup <CreateAttributeSetInstanceExtensionFieldGroup, CreateAttributeSetInstanceExtensionField>());
 }
 public static MergePatchAttributeSetInstanceExtensionFieldGroup ToMergePatchAttributeSetInstanceExtensionFieldGroup(this AttributeSetInstanceExtensionFieldGroupState state)
 {
     return(state.ToMergePatchAttributeSetInstanceExtensionFieldGroup <MergePatchAttributeSetInstanceExtensionFieldGroup, CreateAttributeSetInstanceExtensionField, MergePatchAttributeSetInstanceExtensionField>());
 }
 public static DeleteAttributeSetInstanceExtensionFieldGroup ToDeleteAttributeSetInstanceExtensionFieldGroup(this AttributeSetInstanceExtensionFieldGroupState state)
 {
     return(state.ToDeleteAttributeSetInstanceExtensionFieldGroup <DeleteAttributeSetInstanceExtensionFieldGroup>());
 }
 public static IAttributeSetInstanceExtensionFieldGroupCommand ToCreateOrMergePatchAttributeSetInstanceExtensionFieldGroup(this AttributeSetInstanceExtensionFieldGroupState state)
 {
     return(state.ToCreateOrMergePatchAttributeSetInstanceExtensionFieldGroup <CreateAttributeSetInstanceExtensionFieldGroup, MergePatchAttributeSetInstanceExtensionFieldGroup, CreateAttributeSetInstanceExtensionField, MergePatchAttributeSetInstanceExtensionField>());
 }