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