I've noticed, that in case my C# query contains
(e => e.MyDateTimeData == DateTime.Now)
the generated SQL uses
WHERE [e].[MyDateTimeData] = GETDATE()
When the EF client timezone is different than the SQL Server host SQL Server process user timezone, this will not be good.
The timezones could be different even the client process and the SQL Server process run on the same host.
Missing I something, or is this a real issue?
If you want to use the client time the then pass it in as a parameter, like this:
var dt = DateTime.Now; . . . var q = db.SomeTable.Where(e => e.MyDateTimeData == dt)