public async Task <IEnumerable <TimeSlot> > Rest(string startPointId, string endPointId, DateTime?flightDate) { if (!string.IsNullOrEmpty(startPointId) && !string.IsNullOrEmpty(endPointId) && flightDate != null) { return(await _service.GetRestTimeSlotOfFlight(startPointId, endPointId, (DateTime)flightDate)); } return(new List <TimeSlot>()); }