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