|
brian
Answered 13 May 2023
|
In earlier versions of ASP.NET Core, app.UseMvc() was used to configure MVC routing and related middleware. However, starting from ASP.NET Core 3.0, the preferred approach is to use app.UseEndpoints(). app.UseEndpoints() provides a more unified and streamlined way to configure routing, including MVC, Razor Pages, and API endpoints.