Is it possible to create a case insensitive unique index in Entity Framework core using Fluent API?
For example, a case insensitive unique index can be defined in Oracle using the following SQL:
create unique index test on "Person"(lower("Name"));
However, as far as I'm aware the only option in EF Core is a case sensitive unique constraint, such as:
builder.HasIndex(e => e.Name)
.IsUnique();
I have tried the following but it doesn't work:
builder.HasIndex(e => e.Name.ToLower())
.IsUnique();