Ejemplo n.º 1
0
 public List <RoomDetails> FindRooms(HotelIdentifier hotel, DateTime startDate, DateTime endDate, string roomType)
 {
     using (var dbContext = new HotelContext())
     {
         var hotelEntity = dbContext.Hotels.FirstOrDefault(h => h.Id == hotel.ID);
         if (hotelEntity != null)
         {
             return(FilterAvailableRooms(hotelEntity.RoomRelation, startDate, endDate, roomType)
                    .Select(r => roomMapper.ToDetails(r))
                    .ToList());
         }
         return(new List <RoomDetails>());
     }
 }
Ejemplo n.º 2
0
 public List <RoomDetails> FindRooms(HotelIdentifier hotel, DateTime startDate, DateTime endDate, string roomType)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 3
0
 public List <RoomDetails> FindRooms(HotelIdentifier hotel, DateTime startDate, DateTime endDate, string roomType)
 {
     return(Channel.FindRooms(hotel, startDate, endDate, roomType));
 }