Esempio n. 1
0
        public IList GetByHQL(string hql, ArrayList lists)
        {
            try
            {
                ISession session = HibernateUtil.OpenSession();
                IQuery   query   = session.CreateQuery(hql);

                for (int i = 0; i < lists.Count; i++)
                {
                    query.SetParameter(i, lists[i]);
                }

                return(query.List());
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                HibernateUtil.CloseSession();
            }

            return(null);
        }