Ejemplo n.º 1
0
        /// <summary>
        /// Returns the instance of the BookingDAO object as an interface
        /// </summary>
        /// <param name="type"></param>
        /// <exception cref="InvalidBookingTypeDAOException">Throws an exception if booking type is invalid</exception>
        /// <returns>An Interface for Booking Data Access Objects</returns>
        public IBookingDAO Create(BookingTypes type)
        {
            IBookingDAO bookDAO = null;

            try
            {
                bookDAO = BookingDAO.GetInstance(type);
            }
            catch (InvalidBookingTypeDAOException)
            {
                throw;
            }

            return(bookDAO);
        }