私はこの単純なLINQクエリNULLのdbcontextでの取り扱いとのObjectContext
from e in Employees
where e.DesignationID !=558
select e
を持ってDesignationID
はNULLフィールドです:
objectcontext
でクエリをに翻訳されています
SELECT
[Extent1].[EmployeeID] AS [EmployeeID],
[Extent1].[EmployeeCode] AS [EmployeeCode],
[Extent1].[EmployeeName] AS [EmployeeName],
[Extent1].[DesignationID] AS [DesignationID]
FROM [dbo].[setupEmployees] AS [Extent1]
WHERE 558 <> [Extent1].[DesignationID]
ながらdbcontext
で同じクエリが翻訳されました。
SELECT
[Extent1].[EmployeeID] AS [EmployeeID],
[Extent1].[EmployeeCode] AS [EmployeeCode],
[Extent1].[EmployeeName] AS [EmployeeName],
[Extent1].[DesignationID] AS [DesignationID]
FROM [dbo].[setupEmployees] AS [Extent1]
WHERE NOT ((558 = [Extent1].[DesignationID]) AND ([Extent1].[DesignationID] IS NOT NULL))
なぜobjectcontext
はdbcontext
とは違ってNULLを処理するのですか?