How to create Linq2Sql query, calculating aggregates?

Posted by pil0t on Stack Overflow See other posts from Stack Overflow or by pil0t
Published on 2010-06-04T10:15:34Z Indexed on 2010/06/05 18:12 UTC
Read the original article Hit count: 209

Filed under:
|
|
|

Is there any way to create Linq2SQL query, that will be translated to this:

SELECT  COUNT(*) as totalCount ,
 SUM(v.field1) AS totalfield1,
....
 SUM(v.<fieldN>) AS total<fieldN>
FROM    [dbo].[SomeTable] v

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET