The following should work. I have not compiled it so correct the syntax errors if any.
Also you should try these things by yourself first and then post.
from tab1 in TableOne
where
(
from xyz in TableTwo
where xyz.YId == 1 && xyz.ZID2 == 2
select xyz.YID
).Contains(tab1.XID)
select new { tab1.abc }
or for EF
var arrYID = (from xyz in TableTwo
where xyz.YId == 1 && xyz.ZID2 == 2
select xyz.YID).ToArray();
var objABC = from tab1 in TableOne
where arrYID.Contains(tab1.XID).select new {tab1.abc};
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…