I'm using a sqlite database on my Xamarin app and i'm tring to set collation attribute on my data model
public class Customer
{
[PrimaryKey, AutoIncrement]
public int ID { get; set; }
[Collation("NOCASE")]
public string Name { get; set; }
public string Email { get; set; }
}
but I do not found anywhere which value must I set into collation attribute to control case sensitive / case insensitive collation
this is my test code:
var dbfile = DependencyService.Get<IFileHelper().GetLocalFilePath("data.db");
db = new SQLiteAsyncConnection(dbfile);
db.CreateTableAsync<Customer>().Wait();
var result = await db.Table<Customer>().OrderBy(c => c.Name).ToListAsync();
expected result: case insensitive order in name column,
actual result: the order is case sensitive.