I'm using EF7
with SQLite
, in a UWP
application, here's the situation :
In the Model
's OnConfiguring
method, I used this code :
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
var path = Path.Combine(ApplicationData.Current.LocalFolder.Path, _dbFileName);
optionsBuilder.UseSqlite($"Data Source={path};");
}
The app runs normally in debug
mode, and also normally on release
mode with .Net native
activated but only on a Phone set to English
, the app crashes when the phone is set to French
.
So I used this code instead :
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlite($"Filename={_dbFileName}");
}
The app now works perfectly on a French and English Devices, but crashes on a Device set to Arabic
.
The crash is caused by the following exception :