private DbContextOptionsBuilder <NieuweStroomPocDbContext> GetContextBuilderOptions <T>(string connectionStringName) { var connectionString = ConfigurationSingleton.GetConfiguration().GetConnectionString(connectionStringName); var contextBuilder = new DbContextOptionsBuilder <NieuweStroomPocDbContext>(); var servicesCollection = new ServiceCollection().AddEntityFrameworkSqlServer().BuildServiceProvider(); contextBuilder.UseSqlServer(connectionString).UseInternalServiceProvider(servicesCollection); return(contextBuilder); }
public Request() { var webHostBuilder = new WebHostBuilder().UseStartup <TStartup>().UseConfiguration(ConfigurationSingleton.GetConfiguration()); this.server = new TestServer(webHostBuilder); this.client = server.CreateClient(); }