public ActionResult GoodsList(string id) { var list = string.IsNullOrEmpty(id) ? new List <Good>() : goodService.GetByCategoryId(id); ViewData.Add("categoryId", id); return(View(list)); }
public ActionResult GoodsList(string id) { var list = string.IsNullOrEmpty(id) ? new List <GoodModel>() : goodService.GetByCategoryId(id, true) .Select(i => new GoodModel { Title = i.Title, Price = i.Price, Image = blobService.GetBlobUrl(i.RowKey) }) .ToList(); return(View(list)); }