public ProductModel CreateProductModel() { var model = new ProductModel(); var blank = c("~/Include/img/gallery_none.png"); foreach (var prod in Data.Content.Pages["Products"].Product) { model.Products.Add(new ProductInfo(prod.Name, prod.Description, Url.Content(prod.Link), c(prod.Picture))); } return model; }
private ProductModel CreateProductModel() { var model = new ProductModel(); var blank = c("~/Include/img/gallery_none.png"); foreach (var prod in Data.Content.Pages["Products"].Product) { model.Products.Add(new ProductInfo(prod.Name, prod.Description, Url.Content(prod.Link), blank)); } /*model.Products.Add(new ProductInfo("AbiConvert", "A unit converter", Url.Action("Index", "Converter", new { area = "" }), blank)); model.Products.Add(new ProductInfo("Test Product 1", "Stuff", "#", blank)); model.Products.Add(new ProductInfo("Test Product 2", "Stuff", "#", blank)); model.Products.Add(new ProductInfo("Test Product 3", "Stuff", "#", blank)); model.Products.Add(new ProductInfo("Test Product 4", "Stuff", "#", blank)); model.Products.Add(new ProductInfo("Test Product 5", "Stuff", "#", blank)); model.Products.Add(new ProductInfo("Test Product 6", "Stuff", "#", blank)); model.Products.Add(new ProductInfo("Test Product 7", "Stuff", "#", blank)); model.Products.Add(new ProductInfo("Test Product 8", "Stuff", "#", blank));*/ return model; }