K
kidders
I have a class called Park which has a property which is a collection
of another class ParkSeason. ParkSeason has two properties StartDate
and EndDate.
How would I go about writing a linq query that would return all parks
where a date falls between the startdate and enddate of any of its
parkseason collection.
Something like:
public List<Park> Search(DateTime StartDate)
{
List<Park> allPark = GetAllPark();
var result =
from myPark in allPark
where myPark.SeasonCollection.Find(***)
//not sure what to put from *** onwards, is there linq syntax, do i
use a predicate/delegate?
}
of another class ParkSeason. ParkSeason has two properties StartDate
and EndDate.
How would I go about writing a linq query that would return all parks
where a date falls between the startdate and enddate of any of its
parkseason collection.
Something like:
public List<Park> Search(DateTime StartDate)
{
List<Park> allPark = GetAllPark();
var result =
from myPark in allPark
where myPark.SeasonCollection.Find(***)
//not sure what to put from *** onwards, is there linq syntax, do i
use a predicate/delegate?
}