Optimize out null checks when translating Enum flags #18725
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-enhancement
Milestone
I have an enum with corresponding flags.
The goal now is to check whether a property has one of the passed flags.
Steps to reproduce
Following SQL will be fired:
I don't think this is the correct query: the IS NULL check is unnecessary (column is "int, not null").
If the column could be null, this would even create a wrong query.
Further technical details
EF Core version: 3.0.0
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: 3.1.0-preview1.19506.1
Operating system: Windows 10
IDE: Visual Studio 2019 16.4 Preview 2
The text was updated successfully, but these errors were encountered: