Example #1
0
 public void Configure(IApplicationBuilder app, IHostingEnvironment env)
 {
     app.UseStaticFiles();
     app.AddExceptionHandler();
     app.UseAuthentication();
     app.AddLocalizationConfig();
     app.AddCorsConfig();
     app.AddSwaggerConfig();
     app.UseMvc();
 }
Example #2
0
 public void Configure(IApplicationBuilder app, IHostingEnvironment env, DataSeeder seeder)
 {
     app.MigrationOfContext().GetAwaiter().GetResult();
     seeder.Seed().GetAwaiter().GetResult();
     app.AddCorsConfig();
     app.UseStaticFiles();
     app.UseAuthentication();
     app.UseMvc();
     app.AddSwaggerConfig();
 }
Example #3
0
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, DataSeeder seeder, ILoggerFactory loggerFactory)
        {
            loggerFactory.AddSerilog();
            app.MigrationOfContext().GetAwaiter().GetResult();
            seeder.Seed().GetAwaiter().GetResult();
            app.AddCorsConfig();
            app.UseStaticFiles();
            app.UseAuthentication();

            app.UseSignalR(router => { router.MapHub <ChatHub>("/chatHub"); });
            app.UseMvc();
            app.AddSwaggerConfig();
        }