Exemplo n.º 1
0
        public List <T> RetrieveAllNoFrecuente <T>()
        {
            var      lstResult = SqlDao.ExecuteQueryProcedure(_mapper.GetRetrieveByallStatementNoFrecuente());
            var      dic       = new List <Dictionary <string, object> >();
            List <T> list      = new List <T>();

            if (lstResult.Count > 0)
            {
                for (int i = 0; i < lstResult.Count; i++)
                {
                    dic.Add(lstResult[i]);
                }

                var objs = _mapper.BuildObjectsNoFrecuente(dic);

                for (int i = 0; i < lstResult.Count; i++)
                {
                    list.Add((T)Convert.ChangeType(objs[i], typeof(T)));
                }

                return(list);
            }

            return(default(List <T>));
        }