Async limitations
SQLite doesn't support asynchronous I/O. Async ADO.NET methods will execute synchronously in Microsoft.Data.Sqlite. Avoid calling them.
Instead, use write-ahead logging to improve performance and concurrency.
var connection = new SqliteConnection("Data Source=AsyncSample.db");
connection.Open();
// Enable write-ahead logging
var walCommand = connection.CreateCommand();
walCommand.CommandText =
@"
PRAGMA journal_mode = 'wal'
";
walCommand.ExecuteNonQuery();
Tip
Write-ahead logging is enabled by default on databases created using Entity Framework Core.
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.