select i.invoice_no, i.descrip1, i.date_time, (select sum(isnull(t.extension,0.00)) from dbo.transact t where t.invoice_no=i.invoice_no) as extension, i.finalized from dbo.invoices iand this is what I have in C# right now:
var invoicesList = _dbSet.Where(x => x.Account == accountName && x.Hidden == false). Select(x => new InvoicesList { InvoiceNo = x.InvoiceNo, Account = x.Account, Hidden = x.Hidden, Descrip = x.Descrip1, Finalized = x.Finalized, Created = x.DateTime}); if (showFinalized) { invoicesList = invoicesList.Where(x => x.Finalized == true); }this code is in the Invoices repository class. I'm wondering how can I add the Invoice Balance column into this query.