예제 #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;
        }
예제 #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);
        }