// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, SinkingShipsContext db) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseOpenApi(); app.UseSwaggerUi3(c => c.DocExpansion = "list"); app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); // for tests // db.SeedTestData(); }
public SinkingShipsRepository(SinkingShipsContext dbContext) { this.dbContext = dbContext; }