Which method is used to add MVC route handlers and specify the use of default routes?
- AddMvc
- UseRouting
- UseEndpoints
- MapRoute
In ASP.NET Core, the AddMvc method is used to add MVC route handlers and configure the use of default routes. This method sets up MVC services, including routing, and is essential for building web applications with ASP.NET Core MVC. It's typically called within the Startup class's ConfigureServices method.
Loading...
Related Quiz
- When you want to use a namespace across multiple Razor views without adding it to each view, where should you define it?
- Which method in the Startup class is commonly used to configure middleware?
- Your team has been asked to develop a CMS platform where the frontend and backend logic is closely intertwined. Which ASP.NET Core project structure would be best suited for this?
- _________ is the lightweight, cross-platform web server used by default with ASP.NET Core.
- In the MVC design pattern, which component is primarily responsible for handling user input and interactions?