// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ApplicationDbContext context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseRouting(); app.UseAuthorization(); app.UseSwagger(); app.UseSwaggerUI(setupAction => { setupAction.SwaggerEndpoint( "/swagger/LibraryOpenAPISpecification/swagger.json", "Dental API"); setupAction.RoutePrefix = ""; }); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); var cs = new ScheduleUtility(context); cs.InitializeSchedule(); }