使用 SubSonic.Query.Select 抛出错误的 Subsonic3 Active Record 查询
因此,我尝试使用带有 Sql Server 2008 后端的 SubSonic3 ActiveRecord
facilities = new Select().From<Facility>()
.ExecuteTypedList<Facility>();
以及以下
facilities = new Select().From<Facility>()
.InnerJoin<mem_Users_Facility>().InnerJoin<mem_User>().Where(mem_UsersTable.UserNameColumn).IsEqualTo(System.Web.HttpContext.Current.User)
.ExecuteTypedList<Facility>();
表名称为 dbo.Facility 的以下查询来工作,但 SubSonic 不断生成 SQL 作为设施。该类是由 SubSonic 生成的,因此它知道表名是什么,但看起来 SQL 正在生成,就好像该类在简单存储库(基于 POCO)中使用一样。
我知道我可以使用 Linq 查询语法,但我更熟悉旧语法,并且希望能够同时使用这两种语法。如何用 Subsonic3 编写两个简单的查询
So I am trying to get the following query to work using SubSonic3 ActiveRecord with a Sql Server 2008 backend
facilities = new Select().From<Facility>()
.ExecuteTypedList<Facility>();
as well as the following
facilities = new Select().From<Facility>()
.InnerJoin<mem_Users_Facility>().InnerJoin<mem_User>().Where(mem_UsersTable.UserNameColumn).IsEqualTo(System.Web.HttpContext.Current.User)
.ExecuteTypedList<Facility>();
The Table name is dbo.Facility but SubSonic keeps generating the SQL as Facilities. The class was generated by SubSonic so it knows what the table name is but it looks like the SQL is getting generated as if the class is used in the Simple Repository (based off of a POCO).
I know that I can use the Linq query syntax but I am more familiar with the old syntax and want to be able to use both. How can I write the two simple queries with Subsonic3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论