I want to return a count of new users since a specific date.
Users table has: UserID, username, dateJoined.
SELECT COUNT(USERID)
FROM Users
where dateJoined > @date
How would this look in linq-to-sql?
Can you use the keyword COUNT?
I want to return a count of new users since a specific date.
Users table has: UserID, username, dateJoined.
SELECT COUNT(USERID)
FROM Users
where dateJoined > @date
How would this look in linq-to-sql?
Can you use the keyword COUNT?
I am assuming you have a IEnumberable list called users and some variable called somedate.
This will work against any IEnumberable list not just Linq to Sql
You can go two routes:
or
Both are equivalent, it really boils down to a matter of personal preference.