skip to Main Content

IGrouping Not Found in Razor View – Asp.net

I've done a GroupBy using Linq as follows in a controller: model.aLstProducts = result[0].Results .Where(c => c.Id == ProductId) .ToList() .FirstOrDefault() .ListOfProducts .GroupBy(c => c.ProductCategory); The property has been defined as follows: public IEnumerable<IGrouping<string, ProductsViewModel>> aLstProducts { get; set; }…

VIEW QUESTION
Back To Top
Search