We have several projects in VB.Net using the .NET Framework 4 and Linq for Entities for many of our SQL queries. Switching to EF is a new shift for us (it has been used for about 4-6 months) and has the support of senior management, because we can code much faster. We still use many stored procedures, but we even execute them through Linq for Entities.
I hope that I am embarrassed, and I cannot find a direct answer that makes sense. We have several queries where we need records, where a specific field is NULL. These are simple selection queries, without aggregates or left joins, etc. Microsoft recommends that the query look something like this: MSDN link :
dim query = from a in MyContext.MyTables
Where a.MyField = Nothing
Select a
I have several projects where I do just that, and it works fine, no warnings in the IDE. Recently, a new project was created by another developer, and when he did his zero check, as shown above, we all get this warning in the IDE:
Warning 1 This expression will always evaluate to Nothing (due to zero propagation from the equals operator). To check if the value is null, use "Nothing".
, explicit strict. , , , . , = IS. , ? , MSDN equals.
user1359018