Example #1
0
        public List <Room> RetrieveAllById(int hotel)
        {
            var roomMapper = new RoomMapper();

            try
            {
                var lstResult = SqlDao.GetInstance()
                                .ExecuteQueryProcedure(
                    roomMapper.GetRetriveAllByIdStatement(hotel)
                    );

                if (lstResult.Count <= 0)
                {
                    return(default(List <Room>));
                }

                var obj = EntityObjectMapper.BuildObjects(lstResult);

                return(obj.Cast <Room>().ToList());
            }
            catch (Exception e)
            {
                ManageException(e);
            }

            return(null);
        }