private static SqliteConnection CreateDatabaseAndGetConnection() { var connection = new SqliteConnection("Data Source=:memory:"); connection.Open(); var options = new DbContextOptionsBuilder <BootStoreMigrationsDbContext>() .UseSqlite(connection) .Options; using (var context = new BootStoreMigrationsDbContext(options)) { context.GetService <IRelationalDatabaseCreator>().CreateTables(); } return(connection); }
public EntityFrameworkCoreBootStoreDbSchemaMigrator(BootStoreMigrationsDbContext dbContext) { _dbContext = dbContext; }