c# – 你能让Asp.net MVC View连线编译时安全吗?

c# – 你能让Asp.net MVC View连线编译时安全吗?,第1张

概述获取控制器的标准return语句: return View("Index"); 有没有办法让这个东西编译时安全?使用static reflection或其他一些技巧? 是;你在寻找 this. T4MVC is a T4 template for ASP.NET MVC apps that creates strongly typed helpers that eliminate the use 获取控制器的标准return语句:
return VIEw("Index");

有没有办法让这个东西编译时安全?使用static reflection或其他一些技巧?

解决方法 是;你在寻找 this.

T4MVC is a T4 template for ASP.NET MVC apps that creates strongly typed helpers that eliminate the use of literal strings when referring to controllers,actions and vIEws. It helps make your MVC code much more maintainable,and gives you intellisense where you normally would not have any.

总结

以上是内存溢出为你收集整理的c# – 你能让Asp.net MVC View连线编译时安全吗?全部内容,希望文章能够帮你解决c# – 你能让Asp.net MVC View连线编译时安全吗?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1263888.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-08
下一篇 2022-06-08

发表评论

登录后才能评论

评论列表(0条)

保存