是什么在T4Mvc这两个定义之间的区别? [英] What is the difference between these 2 definitions in T4Mvc?

查看:145
本文介绍了是什么在T4Mvc这两个定义之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Razor视图我有以下几点:

In my razor view I have the following:

   var url = "@Url.Action(Mvc.Leads.GetAllLeads())"
   var url2 = "@Url.Action(Mvc.Leads.Actions.GetAllLeads())"

他们似乎都产生相同的URL。为什么行动财产?

They both appear to generate the same Url. Why the actions property?

推荐答案

在短,没有。操作属性是为了与T4MVC的一个真正的早期版本向后compat的。但它可能会更好干脆抽出,现在为了避免混淆。

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.

这篇关于是什么在T4Mvc这两个定义之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆