Upgrade to .NET Core 3.1

This commit is contained in:
Robert Marshall 2020-01-04 10:43:26 +00:00
parent e5c9f5bd9f
commit edb1f99387
5 changed files with 25 additions and 24 deletions

View file

@ -3,9 +3,9 @@ using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Website.Data;
namespace Website
@ -34,7 +34,7 @@ namespace Website
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie();
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
services.AddMvc(options => options.EnableEndpointRouting = false);
}
private void RegisterRepositories(IServiceCollection services) =>
@ -44,7 +44,7 @@ namespace Website
.AddSingleton(new GitServerApi(new HttpClient(), Configuration["gitDomain"], Configuration["gitToken"]));
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment() )
{