I have a property Name in entity UnitType set to Unique for SQLite using EntityFrameworkCore 2.0.
modelBuilder.Entity<UnitType>().HasIndex(t => t.Name).IsUnique();
But it behaves as case sensitive. Means it considers Gram and gram as two different values and does insert them. This is clearly not what to expect after spending much of my time on MS-SQL.
Also, another problem is when filtering data on this column. Even that is case sensitive.
db.Units.Where(w => w.Name.Contains(SearchText));
How to make it case insensitive?