SyntaxFix
Write A Post
Hire A Developer
Questions
Tags
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?
This question is related to c# sql linq
c#
sql
linq
You should be able to do the count on the purch variable:
purch.Count();
e.g.
var purch = from purchase in myBlaContext.purchases select purchase; purch.Count();
Source: Stackoverflow.com