Ashwani K
Ashwani K

Reputation: 7980

Aggregate functions in Entity framework 3.5

How can we aggregate function (MIN, MAX, COUNT etc) in Entity framework 3.5 in .net.

Thanks Ashwani

Upvotes: 0

Views: 1062

Answers (1)

Craig Stuntz
Craig Stuntz

Reputation: 126547

They're already there in the LINQ API. Just use them. E.g.:

var count = Context.People.Count();

...will get translated to a SQL COUNT.

Upvotes: 1

Related Questions