コード例 #1
0
        public List <T> RetrieveAllByPalabra <T>(BaseEntity entity)
        {
            var lstTraducciones = new List <T>();

            var lstResult = dao.ExecuteQueryProcedure(mapper.GetRetriveByPalabraStatement(entity));
            var dic       = new Dictionary <string, object>();

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

            return(lstTraducciones);
        }
コード例 #2
0
        public override List <T> RetrieveAll <T>()
        {
            var lstCustomers = new List <T>();
            var lstResult    = dao.ExecuteQueryProcedure(mapper.GetRetrieveAllStatement());
            var dic          = new Dictionary <string, object>();

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