亚音速、MVC 和 ActiveRecord
我正在使用 subsonic 3.0 和带有 mysql 数据库的 Active Record 现在一切都很好,但我似乎无法创建视图,请参阅示例:
public ActionResult Index()
{
return View(contact.GetPaged(1,20));
}
现在通常我会右键单击并选择添加视图 然后我会选择强类型并找到存储库的类
,但是由于某种原因,我显示的唯一类仅适用于亚音速 但希望看到新生成的 GraniteMysqlDB 中的新类,
如果有人可以请建议,我将非常感激,因为似乎没有 任何论坛链接或任何亚音速的东西。
谢谢
i am using subsonic 3.0 and active record with a mysql database
now everything is fine, but i cant seem to create views see example:
public ActionResult Index()
{
return View(contact.GetPaged(1,20));
}
now normally i would right click and choose Add View
i would then choose strongly typed and find the class for the repositary
however for some reason the only classes i get showing up are for subsonic only
but expect to see the new class from the new generated graniteMysqlDB
if anyone could please advice i would be most grateful as there doesent seem to be
any forum links or anything for subsonic.
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我已经解决了问题,但如果有人需要它或想知道发生了什么,答案就在这里。
我将我的 TT 文件放入 models 文件夹中,我的命名空间应该是 test2.Models
,但是它是 test2
,我还需要使用 test2.Models 的 using 指令;在我的页面顶部。
仍然出现错误,我必须更正它所放置的继承的视图
我现在必须将其更改为
非常好,与我使用过的其他东西相比,这种亚音速加载速度非常快。
塔
okay i have solved the problem, but the answer is here should anyone need it or wants to know what happened.
i put my TT files into the models folder, my namesspace should have been test2.Models
however it was test2
also i needed the using directive of using test2.Models; at the top of my page.
still get an error where i have to correct the view on the inherites it puts
i have to change this to
very nice now is this subsonic very very fast loading compared to other stuff i have used.
ta