I have the following Linq to SQL query.
var users = rdc.Users.Where(u => u.EmailAddress.Equals(emailaddress) && password.Equals(hash));
But it always translates to:
SELECT [t0].[Id], [t0].[Guid], [t0].[RoleId], [t0].[EmailAddress], [t0].[Password], [t0].[FirstName], [t0].[LastName], [t0].[Created], [t0].[Activated], [t0].[LastAction]
FROM [dbo].[Users] AS [t0]
WHERE 0 = 1
I just re-imported the tables into my DBML file to insure that the latest schema is reflected, but it still removes my clause and adds WHERE 0 = 1
I can use ExecuteQuery<T>(string, params[])
but I want to find the root cause of this.