private TravelClass GetTravelClassFromFlight(int legInstanceId, TravelClassType type) { return(this.LegInstancesServices.GetLegInstance(legInstanceId) .Aircraft .TravelClasses .Where(t => t.Type == type) .FirstOrDefault()); }
private void AddTravelClass( TravelClassType type, string meal, decimal price, int aircraftId, int numberOfRows, int numberOfSeats, bool priorityBoarding = false, bool earnMiles = false) { this.TravelClasses.Add(new TravelClass() { Type = type, Meal = meal, Price = price, PriorityBoarding = priorityBoarding, EarnMiles = earnMiles, NumberOfRows = numberOfRows, NumberOfSeats = numberOfSeats, AircraftId = aircraftId }); }