public List <Arrangement> SearchHotels(String criteria) { List <Arrangement> arrangements = new List <Arrangement>(); List <ObjectId> hotelsids = hotelRepository.GetHotelIds(criteria); foreach (ObjectId id in hotelsids) { arrangements.AddRange(arrangementRepository.GetArrangementsByHotelId(id)); } return(arrangements != null? arrangements : new List <Arrangement>()); }