开发者

Subsonic 2.2 InnerJoin Across Two Databases

开发者 https://www.devze.com 2022-12-09 06:19 出处:网络
Can anyone provide an example of how to join开发者_Go百科 across two schemas using subsonic 2.2.

Can anyone provide an example of how to join开发者_Go百科 across two schemas using subsonic 2.2.

This doesn't work:

SqlQuery qu = new Select("*") .From(NorthwindLeads.Lead.Schema) .InnerJoin(Northwind.StatsMap.SourceIdColumn, NorthwindLeads.Lead.SourceIdColumn);


There's no easy way to do this in subsonic that I'm aware of. I would recommend adding a view to your database which returns the data you want from the other schema and then joining to the view in your subsonic query.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号