문제

I am using SubSonic with the ActiveRecord template. I like it pretty well so far but can not figure out how to do a join query. I have read this link but the generated class templates it creates does not have anything of type IColumn

Is there something I am missing here? Also, I am using SubSonic 3.0

도움이 되었습니까?

해결책

You can use simple Linq queries to do joins with Subsonic.

For example:

var products = from p in Product.All()
               join od in OrderDetail.All() on p.ProductID equals od.ProductID
               select p;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top