subsonic 与 ASP.net MVC2 强类型视图
我有一个 MVC 项目设置,并且已将亚音速 Active Record 模板引入到我的项目中,并且它们已成功生成,并且我可以使用亚音速类来访问我的数据库。但是,如何使用亚音速生成的类创建强类型视图?当我选择“添加视图”并选中复选框以创建强类型视图时,为我的数据从亚音速生成的类均不可用。我该怎么做?
I have an MVC project setup, and I've brought the subsonic Active Record templates into my project, and they generated successfully and I can use the subsonic classes to access my database. However, how do I create a strongly typed view using the subsonic generated classes? When I select "add View" and I check the checkbox to create a strongly-typed view, none of the generated classes from subsonic for my data are available. How do I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能需要首先编译您的项目。
You probably need to compile your project first.
我会手动尝试一下,看看是否有任何错误。打开视图并将:更改
为
您还可以在pages->namespaces下的web.config中添加命名空间:
:如果您想将更改缩短为,
I would try it manually and see if you get any errors. Crack open your view and change:
to
You can also add the namespace in the web.config under pages->namespaces
if you want to shorten the change to: