Пример #1
0
        public Hotels CrearHotel(Hotels hotel)
        {
            if (dao.ObtenerPorCodigo(hotel.Codigo) != null)
            {
                throw new FaultException <RepetidoException>(
                          new RepetidoException()
                {
                    Codigo      = "101",
                    Descripcion = "El hotel con el código ingresado ya existe."
                }, new FaultReason("Error al crear hotel."));
            }

            return(dao.Crear(hotel));
        }
Пример #2
0
        public Hotel CrearHotel(Hotel hotelACrear)
        {
            Hotel Existente = hotelDAO.Obtener(hotelACrear.Id);

            return(hotelDAO.Crear(hotelACrear));
        }