Suppose I have two tables:
Tab1(id, shareid, ....)
Tab2(id, shareid, ...)
DB was modeled by EF. Then I want to a linq get same result开发者_开发技巧 as following sql:
select t1.* from Tab1 t1 join Tab2 t2 on t1.shareid=t2.shareID
So linq should be somthing like:
ObjectContext.Tab1s.Where(...);
How to write the linq for this request?
I guess it will be something that looks like this:
var Result = (from t1 in TBL1
join t2 in TBL2 on t1.SharedId equals t2.SharedId
where t1.whatever == t2.whatever
select new{bla,bla,bla,bla} );
精彩评论