Example #1
0
        protected virtual IProductCategoryStateMergePatched Map(IMergePatchProductCategory c)
        {
            var stateEventId = new ProductCategoryEventId(c.ProductCategoryId, c.Version);
            IProductCategoryStateMergePatched e = NewProductCategoryStateMergePatched(stateEventId);

            e.ProductCategoryTypeId   = c.ProductCategoryTypeId;
            e.PrimaryParentCategoryId = c.PrimaryParentCategoryId;
            e.CategoryName            = c.CategoryName;
            e.Description             = c.Description;
            e.CategoryImageUrl        = c.CategoryImageUrl;
            e.DetailScreen            = c.DetailScreen;
            e.ShowInSelect            = c.ShowInSelect;
            e.AttributeSetId          = c.AttributeSetId;
            e.Active = c.Active;
            e.IsPropertyProductCategoryTypeIdRemoved   = c.IsPropertyProductCategoryTypeIdRemoved;
            e.IsPropertyPrimaryParentCategoryIdRemoved = c.IsPropertyPrimaryParentCategoryIdRemoved;
            e.IsPropertyCategoryNameRemoved            = c.IsPropertyCategoryNameRemoved;
            e.IsPropertyDescriptionRemoved             = c.IsPropertyDescriptionRemoved;
            e.IsPropertyCategoryImageUrlRemoved        = c.IsPropertyCategoryImageUrlRemoved;
            e.IsPropertyDetailScreenRemoved            = c.IsPropertyDetailScreenRemoved;
            e.IsPropertyShowInSelectRemoved            = c.IsPropertyShowInSelectRemoved;
            e.IsPropertyAttributeSetIdRemoved          = c.IsPropertyAttributeSetIdRemoved;
            e.IsPropertyActiveRemoved = c.IsPropertyActiveRemoved;

            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();

            var version = c.Version;


            return(e);
        }
Example #2
0
        protected ProductCategoryStateDeleted NewProductCategoryStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new ProductCategoryEventId(_state.ProductCategoryId, version);
            var e            = NewProductCategoryStateDeleted(stateEventId);

            e.CommandId = commandId;

            e.CreatedBy = (string)requesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();

            return(e);
        }
Example #3
0
        protected virtual IProductCategoryStateDeleted Map(IDeleteProductCategory c)
        {
            var stateEventId = new ProductCategoryEventId(c.ProductCategoryId, c.Version);
            IProductCategoryStateDeleted e = NewProductCategoryStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();


            return(e);
        }
Example #4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            ProductCategoryEventId other = obj as ProductCategoryEventId;

            if (other == null)
            {
                return(false);
            }

            return(true &&
                   Object.Equals(this.ProductCategoryId, other.ProductCategoryId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Example #5
0
 private ProductCategoryStateDeleted NewProductCategoryStateDeleted(ProductCategoryEventId stateEventId)
 {
     return(new ProductCategoryStateDeleted(stateEventId));
 }
Example #6
0
 private ProductCategoryStateMergePatched NewProductCategoryStateMergePatched(ProductCategoryEventId stateEventId)
 {
     return(new ProductCategoryStateMergePatched(stateEventId));
 }
 protected ProductCategoryStateEventDtoBase(ProductCategoryEventId stateEventId)
 {
     this.ProductCategoryEventId = stateEventId;
 }
Example #8
0
 public ProductCategoryStateDeleted(ProductCategoryEventId stateEventId) : base(stateEventId)
 {
 }
Example #9
0
 public ProductCategoryStateMergePatched(ProductCategoryEventId stateEventId) : base(stateEventId)
 {
 }
Example #10
0
 protected ProductCategoryStateEventBase(ProductCategoryEventId stateEventId) : base(stateEventId)
 {
 }