I was having the same problem. I found a workaround by using a different constructor from the base DbContext class:
public DbContext(DbConnection existingConnection, bool contextOwnsConnection);
Using this override you can pass an SQLiteConnection instead which you set the connection string on. So for example you can add a new constructor to your FirmwareContext.
public FirmwareContext(string connectionString)
: base(new SQLiteConnection() { ConnectionString = connectionString }, true)
{
}
Or even
public FirmwareContext(string filename)
: base(new SQLiteConnection() { ConnectionString =
new SQLiteConnectionStringBuilder()
{ DataSource = filename, ForeignKeys = true }
.ConnectionString }, true)
{
}