LINQ for SQL Aggregates

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shimon Sim

    #1

    LINQ for SQL Aggregates

    I am having hard time figuring out how to reproduce following SQL in LINQ

    SELECT State.Name, City.Name, COUNT(Person.Pe rsonId)
    FROM State INNER JOIN City ON State.StateId=C ity.StateId
    INNER JOIN Person Person.CityId=C ity.CityId
    GROUP BY State.Name, City.Name

    I have few quires similar to this on with HAVING, SUM and so on.

    Can some one help me with LINQ expression for this sample?
    Thanks,
    Shimon.


Working...