collections - what is the best linq query for this -
i have collection of calendar objects. calendar has property id.
ienumerable<calendar> calendarstoview;
i have collection of event objects. event objects have property of calendarid
ienumerable<calendarevent> events;
i want filter events collection return events calendarid in calendarstoview collection.
what best way of doing this?
do join
var eventsiwant = e in events c in calendarstoview c.calendarid = e.calendarid select e
Comments
Post a Comment