views:

83

answers:

2

Linq query for:

Record in MyTable has two child records, I want to check if either of these records have an Id from a list of integers.

+2  A: 

here's a start...

from mt in MyTable 
where myIntegerList.Contains(mt.id)
Kon
+2  A: 

Here's an example of how that might be written:

var intList = new List<int>{2,5,223,55};
var query = from m in db.MyTable
            where intList.Contains(m.ChildRecord.Id)
            select m;
Jose Basilio