Strongly Typed ActionLink In Asp.Net MVC 2?

前端 未结 2 398
自闭症患者
自闭症患者 2020-12-31 10:15

I just downloaded VS.NET 2010 RC and created a new MVC project. It would seem that strongly typed ActionLinks are not in this release? Is this always going to be a \"futures

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-31 10:45

    Strongly-typed ActionLink and route helpers are not scheduled to be moved from Futures to the main product any time soon. In general it's not possible to run the MVC pipeline backward. That is, given a MethodInfo and parameters, it's impossible to make a route which is guaranteed to hit that action. For example, custom controller factories, action invokers, filters, existing files, or any number of other things can affect which action (if any) a particular route ends up hitting.

    Because of this, the contract for strongly-typed ActionLink in Futures is essentially "given this information and assuming no extensibility hooks, guess which route will hit this action." Such a contract is inappropriate for actual supported framework code.

提交回复
热议问题