Skip to content
This repository was archived by the owner on Apr 5, 2019. It is now read-only.

Nullable types and EntityFramework.Filters #20

@easyest

Description

@easyest

EntityFramework 6.

The query:

var item = context.Items.FirstOrDefault(x => x.NullableProperty == filter.NullablePropertyValue);

Without EntityFramework.Filters it translates to:

...
WHERE (([Extent1].[NullableProperty] = @p__linq__0) OR (([Extent1].[NullableProperty] IS NULL) AND (@p__linq__0 IS NULL)))

After adding filter interceptor (both in DbConfiguration class or in OnModelCreating) the query is translated to:

...
WHERE ([Extent1].[NullableProperty] = @p__linq__0) 

DBContext.Configuration.UseDatabaseNullSemantics = false; does not fix anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions