I'm trying to find out why in all docs I see services.AddMvc
or services.AddMvcCore
in Startup.cs
but in ASP.NET Core MVC 3.1 template that's created by VS I do not have AddMvc but mvc still works....
the only thing I have related t MVC is
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
endpoints.MapRazorPages();
});
can anyone explain why?