subsonic, mvc and activerecord

雨燕双飞 提交于 2019-12-13 02:56:21

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/1296447/subsonic-mvc-and-activerecord

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!