Esempio n. 1
0
        public override T Retrieve <T>(Entity entity)
        {
            var lstHotel = dao.ExecuteQueryProcedure(mapper.GetRetrieveStatement(entity));
            var dic      = new Dictionary <string, object>();

            if (lstHotel.Count > 0)
            {
                dic = lstHotel[0];
                var objs = mapper.BuildObject(dic);
                return((T)Convert.ChangeType(objs, typeof(T)));
            }

            return(default(T));
        }