CompatibilityVersion -> 2.2

This commit is contained in:
Ryan Brandenburg 2018-05-22 11:18:21 -07:00
parent e47a08612b
commit 647f0f81c2
8 changed files with 17 additions and 17 deletions

View File

@ -61,13 +61,13 @@ namespace Company.WebApplication1
#if (IndividualLocalAuth)
services.AddDbContext<ApplicationDbContext>(options =>
#if (UseLocalDB)
#if (UseLocalDB)
options.UseSqlServer(
Configuration.GetConnectionString("DefaultConnection")));
#else
#else
options.UseSqlite(
Configuration.GetConnectionString("DefaultConnection")));
#endif
#endif
services.AddDefaultIdentity<IdentityUser>()
.AddEntityFrameworkStores<ApplicationDbContext>();
@ -124,9 +124,9 @@ namespace Company.WebApplication1
.Build();
options.Filters.Add(new AuthorizeFilter(policy));
})
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
.SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
#else
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
#endif
}

View File

@ -61,13 +61,13 @@ namespace Company.WebApplication1
#if (IndividualLocalAuth)
services.AddDbContext<ApplicationDbContext>(options =>
#if (UseLocalDB)
#if (UseLocalDB)
options.UseSqlServer(
Configuration.GetConnectionString("DefaultConnection")));
#else
#else
options.UseSqlite(
Configuration.GetConnectionString("DefaultConnection")));
#endif
#endif
services.AddDefaultIdentity<IdentityUser>()
.AddEntityFrameworkStores<ApplicationDbContext>();
#elif (OrganizationalAuth)
@ -115,7 +115,7 @@ namespace Company.WebApplication1
.AddAzureADB2C(options => Configuration.Bind("AzureAdB2C", options));
#endif
#if (OrganizationalAuth)
#if (OrganizationalAuth)
services.AddMvc(options =>
{
var policy = new AuthorizationPolicyBuilder()
@ -123,9 +123,9 @@ namespace Company.WebApplication1
.Build();
options.Filters.Add(new AuthorizeFilter(policy));
})
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
.SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
#else
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
#endif
}

View File

@ -21,7 +21,7 @@ type Startup private () =
// This method gets called by the runtime. Use this method to add services to the container.
member this.ConfigureServices(services: IServiceCollection) =
// Add framework services.
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1) |> ignore
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2) |> ignore
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
member this.Configure(app: IApplicationBuilder, env: IHostingEnvironment) =

View File

@ -43,7 +43,7 @@ namespace Company.WebApplication1
services.AddAuthentication(AzureADB2CDefaults.BearerAuthenticationScheme)
.AddAzureADB2CBearer(options => Configuration.Bind("AzureAdB2C", options));
#endif
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.

View File

@ -21,7 +21,7 @@ type Startup private () =
// This method gets called by the runtime. Use this method to add services to the container.
member this.ConfigureServices(services: IServiceCollection) =
// Add framework services.
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1) |> ignore
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2) |> ignore
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
member this.Configure(app: IApplicationBuilder, env: IHostingEnvironment) =

View File

@ -22,7 +22,7 @@ namespace Company.WebApplication1
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
// In production, the Angular files will be served from this directory
services.AddSpaStaticFiles(configuration =>

View File

@ -22,7 +22,7 @@ namespace Company.WebApplication1
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
// In production, the React files will be served from this directory
services.AddSpaStaticFiles(configuration =>

View File

@ -22,7 +22,7 @@ namespace Company.WebApplication1
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
// In production, the React files will be served from this directory
services.AddSpaStaticFiles(configuration =>