问题
In my razor view I have the following:
var url = "@Url.Action(Mvc.Leads.GetAllLeads())"
var url2 = "@Url.Action(Mvc.Leads.Actions.GetAllLeads())"
They both appear to generate the same Url. Why the actions property?
回答1:
In short, no. The Actions property is there for backward compat with a really early version of T4MVC. But it may be better to yank it altogether now to avoid confusion.
来源:https://stackoverflow.com/questions/8536269/what-is-the-difference-between-these-2-definitions-in-t4mvc