Esempio n. 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);
        }
Esempio n. 2
0
        public virtual void MergePatch(IMergePatchProductCategory c)
        {
            IProductCategoryStateMergePatched e = Map(c);

            Apply(e);
        }
 void IProductCategoryApplicationService.When(IMergePatchProductCategory c)
 {
     this.When((MergePatchProductCategoryDto)c);
 }
Esempio n. 4
0
 public virtual void When(IMergePatchProductCategory c)
 {
     Update(c, ar => ar.MergePatch(c));
 }