In relation to this question: Does EF Core allow a unique column to contain multiple nulls?
I want every value to be unique, even null.
config.Entity<Product>()
.HasIndex(b => b.ProductId)
.IsUnique();
The equivalent in SQL works
[ProductId] int null unique foreign key references Product([Id])
Can I modify this code to prevent multiple nulls on a column?