Beispiel #1
0
        public static ProductSimpleModel ToSimpleModel(this Product po)
        {
            var model = new ProductSimpleModel
            {
                ProductId = po.ProductId,
                ProductName = po.PrimaryName,
                BrandId = po.BrandId,
                BrandName = po.Brand.Name,
                Price = po.Price,
                PrimaryImageUrl = "content/images/demo/product_1.jpg",
                Retailers = po.Retailers.ToList()
            };

            return model;
        }
Beispiel #2
0
        public static ProductSimpleModel ToSimpleModel(this Product po)
        {
            var model = new ProductSimpleModel
            {
                ProductId       = po.ProductId,
                ProductName     = po.PrimaryName,
                BrandId         = po.BrandId,
                BrandName       = po.Brand.Name,
                Price           = po.Price,
                PrimaryImageUrl = "content/images/demo/product_1.jpg",
                Retailers       = po.Retailers.ToList()
            };

            return(model);
        }