// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, ApiTestContext dbContext ) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); app.UseAuthentication(); app.UseMvc(); using (var serviceScope = app.ApplicationServices.GetRequiredService <IServiceScopeFactory>().CreateScope()) { if (!serviceScope.ServiceProvider.GetService <ApiTestContext>().AllMigrationsApplied()) { serviceScope.ServiceProvider.GetService <ApiTestContext>().Database.Migrate(); serviceScope.ServiceProvider.GetService <ApiTestContext>().EnsureSeeded(); } } dbContext.Database.EnsureCreated(); }
public Conferences(ApiTestContext testContext) { _client = testContext.HttpClient; }
public Speakers(ApiTestContext testContext) { _client = testContext.HttpClient; }
public Communities(ApiTestContext testContext) { _client = testContext.HttpClient; }