The following code
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
var connectionStringBuilder = new SqliteConnectionStringBuilder() { DataSource = Constants.DataDBPath };
var connectionString = connectionStringBuilder.ToString();
var connection = new SQLiteConnection() { ConnectionString = connectionString };
optionsBuilder.UseSqlite(connection);
}
cannot receive pragma settings such as journalmode or syncmode.
How can I apply the pragma settings to the db?
I tried:
using (var context = new DataDBContext())
{
var connection = context.Database.GetDbConnection();
connection.Open();
var command = connection.CreateCommand();
command.CommandText = "PRAGMA synchronous=OFF; PRAGMA journal_mode=OFF; PRAGMA count_changes=OFF; PRAGMA temp_store=OFF; PRAGMA page_size=65536; PRAGMA cache_size=-16777216;";
command.ExecuteNonQuery();
}
but it didn't help.
The following code
cannot receive pragma settings such as journalmode or syncmode.
How can I apply the pragma settings to the db?
I tried:
but it didn't help.