示例#1
0
        public async Task <ActionResult> Tag(string tag)
        {
            ViewData["Tag"] = tag;

            //Fetch items containing a specific tag
            var TagProducts = await CosmosDBClient <Products> .GetItemsAsync("Products", p => p.ProductTags.Contains(tag));

            return(View(TagProducts));
        }
示例#2
0
        public async Task <ActionResult> Category(string category)
        {
            ViewData["Category"] = category;

            //Fetch items from the specific category
            var CategoryProducts = await CosmosDBClient <Products> .GetItemsAsync("Products", p => p.ProductCategory == category);

            return(View(CategoryProducts));
        }