Exemple #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, DoenerOrderContext dbContext, AppIdentityDbContext appIdentityDbContext)
        {
            dbContext.Database.Migrate();
            appIdentityDbContext.Database.Migrate();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                SwaggerSetup.ConfigureApplication(app);
            }

            app.UseHttpsRedirection();
            app.UseRouting();

            JwtSetup.ConfigureApplication(app);
            app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
        }
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, PlantLogBookContext dbContext)
        {
            dbContext.Database.Migrate();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                SwaggerSetup.ConfigureApplication(app);
                app.UseCors("AllowAll");
            }


            app.UseHttpsRedirection();

            app.UseRouting();

            app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
        }