I am searching for the Linq-to-SQL equivalent to this query:
SELECT [cnt]=COUNT(*), [colB]=SUM(colB), [colC]=SUM(colC), [colD]=SUM(colD) FROM myTable
You can do the same query using Lambda expression as follows:
var orderTotals = db.Orders .GroupBy( i => 1) .Select( g => new { cnt = g.Count(), ScolB = g.Sum(item => item.ColB), ScolC = g.Sum(item => item.ColC) });