public (bool isValid, List <string> messages) Validate(FlightSummary flightSummary, ScheduledFlight scheduledFlight) { var isValid = flightSummary.SeatsTaken < scheduledFlight.Aircraft.NumberOfSeats; var messages = new List <string>(); if (!isValid) { var possiblePlanes = _planeRepository.GetSet() .Where(x => x.NumberOfSeats > flightSummary.SeatsTaken) .ToList(); if (possiblePlanes.Count > 0) { messages.Add("Other more suitable aircraft are:"); possiblePlanes.ForEach(p => { messages.Add($"{p.Name} could handle this flight."); }); } } return(isValid, messages); }