Subsonic:自连接查询需要
我想构建将在.net 中使用的查询。下面你可以看到sql查询,任何人都可以给我等效的亚音速查询
选择不同的 a2.AccountID AS BID, a2.AccountName AS 品牌 从 账户一 INNER JOIN 帐户 a2 ON a.ParentID = a2.AccountID 在哪里 a.账户类型ID = 6 订购依据 品牌
请帮我。
I want to construct the query which is going to be used in .net. Below you can see the sql query, any one can give me the equivalent subsonic query
SELECT DISTINCT a2.AccountID AS BID, a2.AccountName AS Brand FROM Account a INNER JOIN Account a2 ON a.ParentID = a2.AccountID WHERE a.AccountTypeID = 6 ORDER BY Brand
Please help me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
亚音速 2 还是 3?
使用 SubSonic,你总是有一个漂亮的后门。
它在 2.x 中称为 InlineQuery,在 3.x 中称为 CodingHorror
,例如:
如果由于语法检查和 sql 转换而想保留流畅的界面。这是我能想到的另一种方法(SubSonic 2.2),
但我从未这样做过,也没有验证过。但也许它有效。
SubSonic 2 or 3?
With SubSonic you always have a nice backdoor.
It's called InlineQuery in 2.x and CodingHorror in 3.x
e.g:
If you want to stay with the fluent interface because of the syntax checking and the sql conversion. Here is another approach I could think of (SubSonic 2.2)
But I never did this and I haven't verified it. But maybe it works.