For example, if I had a Linq to SQL data context, or if I had ADO.NET Entity Framework entities that mapped to a database table, and I want to select a single Customer...
What is the difference between:
MyDatabaseContext.Customers.Any(c => c.CustomerId == 3)
and
MyDatabaseContext.Customers.Where(c => c.CustomerId == 3)
Are both even valid?
.Any<> - return type bool
.Where<> - return type IQueryable
EDIT: Corrected question wording after accepting answer from Fredrik Mörk - thanks.