public MigrationsSqlServerFixture() { _serviceProvider = new ServiceCollection() .AddEntityFramework() .AddSqlServer() .ServiceCollection() .BuildServiceProvider(); var connectionStringBuilder = new SqlConnectionStringBuilder { InitialCatalog = nameof(MigrationsSqlServerTest) }; connectionStringBuilder.ApplyConfiguration(); var optionsBuilder = new DbContextOptionsBuilder(); optionsBuilder.UseSqlServer(connectionStringBuilder.ConnectionString); _options = optionsBuilder.Options; }