// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, G2DbContext dbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseSwagger(); app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "G2.DK.Api v1")); } app.UseInfrastructure(Configuration); app.UseCors(option => option.AllowAnyOrigin()); dbContext.Database.Migrate(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public UserRepository(G2DbContext dbContext) => _dbContext = dbContext;
public CharacterRepository(G2DbContext dbContext) => _dbContext = dbContext;