Search code examples
asp.net-mvcstrong-typing

Strongly typed controller name in asp.net mvc 2


Is it possible to use strongly typed controller name and action name in asp.net mvc? for example instead of

ActionLink("ActionName", "ControllerName");

somthing like this

ActionLink(ControllerName(x=>x.ActionName()), ControllerName)

Thanks, Alexander.


Solution

  • T4MVC does this. Watch this video for an introduction:

    http://channel9.msdn.com/posts/jongalloway/Jon-Takes-Five-with-David-Ebbo-on-T4MVC/