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

How to use Exist sql function in Linq – Mysql

var _query = _dbContext.CashVoucherDetails .Where(x => x.CreationDate.Date >= From.Date && x.CreationDate.Date <= To.Date && (x.Type == Common.TransactionType.CPV || x.Type == Common.TransactionType.BPV) && x.CompanyCode == BranchCode && x.DebitAmount > 0) .GroupBy(v => new { v.AccountCode}) .Select(g => new { AccountCode =…

VIEW QUESTION
Back To Top
Search