views:

1619

answers:

1

Hello!

How can I do a "select count(*)" using ADO.NET Entity Framework?

Thanks!

+2  A: 

Use the Count() LINQ operator. If you're using C#, there isn't anything in the query expression syntax to cover this, so you have to do call it with dot-notation.

Jon Skeet