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.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *