Esempio n. 1
0
        public virtual DemoCartConfiguredGroupEntity FromModel(DemoCartConfiguredGroup group, PrimaryKeyResolvingMap pkMap)
        {
            if (group == null)
            {
                throw new ArgumentNullException(nameof(group));
            }

            pkMap.AddPair(group, this);

            Id               = group.Id;
            ProductId        = group.ProductId;
            CreatedDate      = group.CreatedDate;
            CreatedBy        = group.CreatedBy;
            ModifiedDate     = group.ModifiedDate;
            ModifiedBy       = group.ModifiedBy;
            Quantity         = group.Quantity;
            Currency         = group.Currency;
            ListPrice        = group.ListPrice;
            ListPriceWithTax = group.ListPriceWithTax;
            SalePrice        = group.SalePrice;
            SalePriceWithTax = group.SalePriceWithTax;

            return(this);
        }
Esempio n. 2
0
        public virtual DemoCartConfiguredGroup ToModel(DemoCartConfiguredGroup group)
        {
            if (group == null)
            {
                throw new ArgumentNullException(nameof(group));
            }

            group.Id               = Id;
            group.ProductId        = ProductId;
            group.CreatedDate      = CreatedDate;
            group.CreatedBy        = CreatedBy;
            group.ModifiedDate     = ModifiedDate;
            group.ModifiedBy       = ModifiedBy;
            group.Quantity         = Quantity;
            group.Currency         = Currency;
            group.ListPrice        = ListPrice;
            group.ListPriceWithTax = ListPriceWithTax;
            group.SalePrice        = SalePrice;
            group.SalePriceWithTax = SalePriceWithTax;

            group.ItemIds = Items.Select(x => x.Id).ToList();

            return(group);
        }