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.
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.
here's a start...
from mt in MyTable
where myIntegerList.Contains(mt.id)
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;