public SqlServerE2EFixture() { SqlServerTestStore.CreateDatabase( "SqlServerReverseEngineerTestE2E", scriptPath: "ReverseEngineering/E2E.sql", nonMasterScript: false, recreateIfAlreadyExists: true); }
public SqlAzureFixture() { SqlServerTestStore.CreateDatabase("adventureworks", scriptPath: "SqlAzure/adventureworks.sql", nonMasterScript: true); Services = new ServiceCollection() .AddEntityFrameworkSqlServer() .AddSingleton <ILoggerFactory>(new TestSqlLoggerFactory()).BuildServiceProvider(); Options = new DbContextOptionsBuilder() .UseInternalServiceProvider(Services) .EnableSensitiveDataLogging() .UseSqlServer(SqlServerTestStore.CreateConnectionString("adventureworks")).Options; }
public SqlAzureFixture() { SqlServerTestStore.CreateDatabase("adventureworks", scriptPath: "SqlAzure/adventureworks.sql", recreateIfAlreadyExists: false); var optionsBuilder = new DbContextOptionsBuilder(); optionsBuilder.EnableSensitiveDataLogging() .UseSqlServer(SqlServerTestStore.CreateConnectionString("adventureworks")); Options = optionsBuilder.Options; var serviceCollection = new ServiceCollection(); serviceCollection.AddEntityFramework() .AddSqlServer(); serviceCollection.AddSingleton <ILoggerFactory>(new TestSqlLoggerFactory()); Services = serviceCollection.BuildServiceProvider(); }
public SqlServerE2EFixture() { SqlServerTestStore.CreateDatabase( "SqlServerReverseEngineerTestE2E", "ReverseEngineering/E2E.sql", true); }
public static SqlServerTestStore GetSharedStore() { return(SqlServerTestStore.GetOrCreateShared( DatabaseName, () => SqlServerTestStore.CreateDatabase(DatabaseName, scriptPath: @"Northwind.sql"))); }