query:
context.Tags.Where(t => !(t.Gear.HasSoulPatch ? true : t.Gear.HasSoulPatch))
since the entire predicate is negated, we should be applying "full" null semantics rewrite - i.e. remove cases where the predicate can ever evaluate to null. However we generate the following sql:
SELECT [t].[Id], [t].[GearNickName], [t].[GearSquadId], [t].[Note]
FROM [Tags] AS [t]
LEFT JOIN (
SELECT [t.Gear].*
FROM [Gears] AS [t.Gear]
WHERE [t.Gear].[Discriminator] IN (N'Officer', N'Gear')
) AS [t0] ON ([t].[GearNickName] = [t0].[Nickname]) AND ([t].[GearSquadId] = [t0].[SquadId])
WHERE CASE
WHEN [t0].[HasSoulPatch] = 1
THEN 1 ELSE [t0].[HasSoulPatch]
END <> 1
whose predicate can evaluate to null if [t0].[HasSoulPatch] itself is null
query:
since the entire predicate is negated, we should be applying "full" null semantics rewrite - i.e. remove cases where the predicate can ever evaluate to null. However we generate the following sql:
whose predicate can evaluate to null if
[t0].[HasSoulPatch]itself is null