I have this model:
public class Subject
{
public int Id { get; set; }
[Required]
[StringLength(50)]
public string Name { get; set; }
pu
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);