public FlightCollection GetFlightsByGroupId(Guid groupId) { FlightCollection flightsForCurrentGroup = new FlightCollection(); foreach (Flight flight in items) { if (flight.CompetitorGroupId == groupId) { flightsForCurrentGroup.Add(flight); } } return flightsForCurrentGroup; }
public FlightCollection GetFlightsByCompetitorId(Guid competitorId) { FlightCollection flightsForCurrentCompetitor = new FlightCollection(); foreach (Flight flight in items) { if (flight.CompetitorId == competitorId) { flightsForCurrentCompetitor.Add(flight); } } return flightsForCurrentCompetitor; }