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