I had a .netcoreapp1.1 project.
Recently, I changed the version from .netcoreapp1.1 to .NET Core 6.0. After this change. I see this warning message:
warning : Using 'UseMvc' to configure MVC is not supported while using Endpoint Routing. To continue using 'UseMvc'.
I understand that by setting EnableEndpointRouting to false I can solve the issue, but I need to know what is the best way to solve it and why Endpoint Routing does not need UseMvc() function.
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggingBuilder builder)
{
builder.AddConfiguration(Configuration.GetSection("Logging"));
builder.AddConsole();
builder.AddDebug();
app.UseDefaultFiles();
app.UseStaticFiles();
app.UseMvc();
}