NerdDinner 教程中的 GetRuleViolations 方法存在问题

发布于 2024-09-24 06:00:45 字数 202 浏览 1 评论 0原文

我正在阅读 NerdDinner 教程(MVC 1.0 版本)的第 70 页。此时它不会构建,因为它表示无法解析 GetRuleViolations 中引用的属性(即标题、描述等)。我将我自己的项目与可下载的源代码进行了比较,但无法找出缺少的内容。 VS 2008 给我的错误是“当前上下文中不存在名称‘Title’”。我可以在 NerDinner.designer.cs 文件中看到声明。

I'm on about page 70 of the NerdDinner tutorial (MVC 1.0 version). It won't build at this point because it is saying the properties referred to in the GetRuleViolations (ie, Title, Description, etc) can't be resolved. I've compared my own project with the downloadable source code and can't figure out what is missing. The error VS 2008 is giving me is "The name 'Title' does not exist in the current context". I can see the declarations in the NerDinner.designer.cs file.

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

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

发布评论

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

评论(1

楠木可依 2024-10-01 06:00:45

您是否确定导入了模型类型的命名空间?

Did you make sure to import the namespace of the model type?

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