select * from AccountTransactions a
where
a.TransactionId =19687 OR
a.TransactionId in (select ChildId from AccountTransactionRelations where InvoiceId=19687)
will have this equivalent in linq:
var records = from t in odc.AccountTransactions
join r in odc.AccountTransactionRelations on t.TransactionId equals r.InvoiceId into rel
where t.TransactionId == transactionId || rel.Select(o => o.ChildId).Contains(transactionId)
select t;
No comments:
Post a Comment