Answer the question
In order to leave comments, you need to log in
Building strange query in linq to db, how to fix?
Linq to DB
return await dbSet.FirstOrDefaultAsync(u => u.Email.ToUpper() == email.ToUpper());
FROM [dbo].[Users] AS [Extent1]
WHERE ((UPPER([Extent1].[Email])) = (UPPER(@p__linq__0))) OR ((UPPER([Extent1].[Email]) IS NULL) AND (UPPER(@p__linq__0) IS NULL))
Answer the question
In order to leave comments, you need to log in
By default, there should be no case sensitivity, and if this was not done intentionally, then there is no need to do ToUpper() .
return await dbSet.FirstOrDefaultAsync(u => u.Email == email);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question