Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
T-SQL query to LINQ
Message
 
 
To
20/10/2014 14:18:29
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
ASP.NET
Category:
LINQ
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01609660
Message ID:
01609674
Views:
42
I got as far as
 var invoicesList = (from invoices in _dbSet.Where(x => x.Account == accountName && x.Hidden == false)
                                join transact in _siriusContext.Transact on invoices.InvoiceNo equals transact.InvoiceNo into InvoiceBalance
                                from rt in InvoiceBalance.DefaultIfEmpty()
                                select new InvoicesList
                                {
                                    InvoiceNo = invoices.InvoiceNo,
                                    Account = invoices.Account,
                                    Hidden = invoices.Hidden,
                                    Descrip = invoices.Descrip1,
                                    Created = invoices.DateTime,
                                    Finalized = invoices.Finalized,
                                    Balance = (decimal?)rt.Extension??0
                                });
but this is still not what I want as I want sum of extension. Still struggling.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform