在ASP.NET MVC中,推荐使用UpdateModel

发布于 2024-08-16 05:00:03 字数 209 浏览 1 评论 0原文

在 ASP.NET MVC 中,UpdateModel 即使不是有点太黑盒,也是非常方便的。然而,我使用 ASP.NET MVC 的主要原因之一正是因为与 ASP.NET 相比,我获得了疯狂的控制量,因此从意识形态的角度来看,黑匣子部分让我有点困扰。

是否推荐使用 UpdateModel?它被用在(最初的)规范的书呆子晚宴中,所以它显然得到了当权者的某种认可,但我怀疑这就是最终的决定。

In ASP.NET MVC, UpdateModel is dreadfully convenient if not a bit too black box. One of the primary reasons I use ASP.NET MVC, however, is exactly for the insane amount of control I get compared to ASP.NET so from an ideology perspective, the black box part bothers me a bit.

Is the use of UpdateModel recommended? It's used in the (original) canonical Nerd Dinner so it obviously has somewhat of a endorsement from the powers that be but I doubt that's the final word.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忱杏 2024-08-23 05:00:03

考虑到您必须编写来更新模型对象的代码(无聊且重复),我很高兴它们包含该功能。由于它使您可以控制允许哪些成员以及禁止哪些成员,因此它得到了我的投票。很棒的功能!!!

Considering the code that you would have to write to update a model object (boring and repetative) Im glad that they include the feature. As it gives you control over which members to allow and which to not, its got my vote. Great feature!!!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文