3

Possible Duplicate:
SELECT MIN(ZoneMin), MAX(ZoneMin) FROM Plant as LINQ to SQL

I am having a hard time trying to convert the following SQL query into Linq.

SELECT 
  COUNT(*) AS Qty, 
  MAX(Field1) AS MinValue, 
  MIN(Field1) AS MaxValue,
  SUM(Field2) AS TotalValue
FROM 
  Table1
WHERE
  FieldTypeID = 1

I do realize that I could perform 4 linq expressions to get each part, but I would rather not hit the server 4 times if possible.

Community
  • 1
  • 1
Cheval
  • 403
  • 4
  • 14

0 Answers0