Accessing the list of Controllers/Actions in an ASP.NET MVC application

后端 未结 2 1551
名媛妹妹
名媛妹妹 2020-12-03 04:09

We know that behind the scenes, the ASP.NET MVC framework will use reflection to determine what controllers/actions are available to be executed, based on which classes der

2条回答
  •  不知归路
    2020-12-03 04:50

    This is done in an internal class in the System.Web.Mvc assembly called System.Web.Mvc.ControllerTypeCache.

    By the way, action methods are not required to return ActionResult. They can return void happily, for instance.

提交回复
热议问题