Пример #1
0
        public override List <T> RetrieveAll <T>()
        {
            var lstResults = new List <T>();
            var lstResult  = dao.ExecuteQueryProcedure(mapper.GetRetriveAllStatement());
            var dic        = new Dictionary <string, object>();

            if (lstResult.Count > 0)
            {
                var objs = mapper.BuildObjects(lstResult);
                foreach (var item in objs)
                {
                    lstResults.Add((T)Convert.ChangeType(item, typeof(T)));
                }
            }

            return(lstResults);
        }
Пример #2
0
        public override List <T> RetrieveAll <T>()
        {
            var lstRoles  = new List <T>();
            var lstResult = dao.ExecuteQueryProcedure(_mapper.GetRetriveAllStatement());

            if (lstResult.Count <= 0)
            {
                return(lstRoles);
            }

            var objs = _mapper.BuildObjects(lstResult);

            foreach (var c in objs)
            {
                lstRoles.Add((T)Convert.ChangeType(c, typeof(T)));
            }

            return(lstRoles);
        }