How can I write LINQ to SQL with COUNT?
Example:
var purch = from purchase in myBlaContext.purchases select purchase;
How can I get the count here?
Like that
var purchCount = (from purchase in myBlaContext.purchases select purchase).Count();
or even easier
var purchCount = myBlaContext.purchases.Count()
2.1m questions
2.1m answers
60 comments
57.0k users