From 5954a2f98e017cdcf998470302fd3081c9541768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Jim=C3=A9nez=20Aliaga?= Date: Thu, 27 Jun 2019 02:17:56 +0200 Subject: [PATCH] Remove blank lines in Configure Services for Razor and Mvc --- .../content/RazorPagesWeb-CSharp/Startup.cs | 3 +-- .../Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Startup.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Startup.cs index 3b7a242e38..a3f05bd3fd 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Startup.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/Startup.cs @@ -52,7 +52,6 @@ namespace Company.WebApplication1 // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - #if (IndividualLocalAuth) services.AddDbContext(options => #if (UseLocalDB) @@ -108,8 +107,8 @@ namespace Company.WebApplication1 services.AddAuthentication(AzureADB2CDefaults.AuthenticationScheme) .AddAzureADB2C(options => Configuration.Bind("AzureAdB2C", options)); #endif - #if (OrganizationalAuth) + services.AddRazorPages().AddMvcOptions(options => { var policy = new AuthorizationPolicyBuilder() diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs index 915e26d1b1..148b3b4bc4 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs @@ -52,7 +52,6 @@ namespace Company.WebApplication1 // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - #if (IndividualLocalAuth) services.AddDbContext(options => #if (UseLocalDB) @@ -108,8 +107,8 @@ namespace Company.WebApplication1 services.AddAuthentication(AzureADB2CDefaults.AuthenticationScheme) .AddAzureADB2C(options => Configuration.Bind("AzureAdB2C", options)); #endif - #if (OrganizationalAuth) + services.AddControllersWithViews(options => { var policy = new AuthorizationPolicyBuilder()