Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
T-SQL query to LINQ
Message
 
 
To
20/10/2014 14:08:00
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:
01609669
Views:
32
>>I was wrong in telling you the problem. The problem with your code is that there is no Where operator on decimal.
>>
>>Since I can not figure your syntax, I am trying to find other samples. Unfortunately, I can not so far make that one I found work either.
>>
>>I am reading more into the syntax and looking into various samples trying to adapt to my case.
>
>Is extension nullable? Will it ever be null? If it isn't in decimal format convert it to decimal. Show me the actual error message.

The error I am getting in design time as I can not get the syntax to compile. So, it's not the actual error I can copy.

Right now I am so confused with this syntax that I don't know how to complete this beginning:
var invoicesList =  (from  invoices in _dbSet.Where(x => x.Account == accountName && x.Hidden == false)
                 from t in _siriusContext.Transact.Where(w=>w.Extension != null && w.InvoiceNo == invoices.InvoiceNo) 
                 



                              select new InvoicesList { InvoiceNo = x.InvoiceNo, Account = x.Account, Hidden = x.Hidden, Descrip = x.Descrip1, Finalized = x.Finalized, Created = x.DateTime, Balance=}))
So, from the very top 2 lines I don't know how to get to my very last line to produce the list I need where Balance is the sum. Extension field is not nullable. I guess the original T-SQL query used isnull as the invoices not necessary have transactions.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform