Ejemplo n.º 1
0
        public ActionResult GoodsList(string id)
        {
            var list = string.IsNullOrEmpty(id) ?
                       new List <Good>() :
                       goodService.GetByCategoryId(id);

            ViewData.Add("categoryId", id);

            return(View(list));
        }
Ejemplo n.º 2
0
        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));
        }