示例#1
0
        public List <T> RetrieveAllByRol <T>(Entity entity)
        {
            var Hotel      = (Hotel)entity;
            var lstHoteles = new List <T>();

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

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

            return(lstHoteles);
        }