Creating filtered index excluding NULL
values is the default EF Core behavior for unique indexes containing nullable columns.
You can use HasFilter fluent API to change the filter condition or turn it off by passing null
as sql
argument:
entityBuilder.HasIndex(e => new { e.LevelId, e.Name, e.DeletedAt })
.IsUnique()
.HasFilter(null);