Skip to content
Advertisement

Sql Query to Linq

How would I convert this query from SQL to Linq:


Update

Thanks Guys, this is the code I used. Tested and returns the same as above:

Advertisement

Answer

I don’t know if the syntax is correct (especially the last two lines) but it should be pretty close.

I added the 0 between group and by based on Eamon Nerbonne’s correction in the comments. Also, thanks to Ryan Versaw for the link explaining List and arrays for generating IN clauses.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement