I\'m using an embedded Firebird database with code first (Entity Framework 6). The first time the application runs, it works fine: the database gets created and the data ge
I Had the same problem, The Entity initializer is bugged with Firebird embedded:
Database.SetInitializer<FirebirdDbContext>(new CreateDatabaseIfNotExists<FirebirdDbContext>());
is the problem, change it to:
Database.SetInitializer<FirebirdDbContext>(null);
But it will not create the database for you. You could check if the database file existis then change de initializer.
or you can create your initializer that does tha same, and works:
public class MyCreateDatabaseIfNotExists : IDatabaseInitializer<FirebirdDbContext>
{
public void InitializeDatabase(FirebirdDbContext context)
{
if (!context.Database.Exists())
{
context.Database.Create();
}
}
}