To enable MVC in ASP.NET Core's Startup.cs, which method should be invoked inside the ConfigureServices method?
- services.AddMvc()
- services.UseMvc()
- services.ConfigureMvc()
- services.EnableMvc()
To enable MVC in ASP.NET Core, you should invoke the services.AddMvc() method inside the ConfigureServices method of the Startup.cs class. This method configures MVC services, such as routing, controllers, and view engines, making MVC available in your application.
Loading...
Related Quiz
- In a CI/CD pipeline, what does the acronym CI stand for?
- The _________ class in ASP.NET Core Identity is particularly useful for creating and managing users.
- Which of the following is a containerization tool that can be used with ASP.NET Core for deployment?
- To serve static files, one must configure the necessary _________ in the Startup.cs file.
- Your organization wants to implement a deployment pipeline where every code change goes through a series of automated tests and, if successful, gets deployed to production automatically. What kind of deployment strategy is your organization aiming for?