Hi,
Below is my code, i want to return the query output in list and bind with datagrid, but i am getting error. Can anybody help me?
what would be return type for NHibernateUtil?
config = new NHibernate.Cfg.Configuration();
config.AddAssembly(typeof(CSTS.Main.CashPosting).Assembly); factory = config.BuildSessionFactory();
session = factory.OpenSession();
IList<CSTS.Main.CashPosting> cashpostlist= session.CreateSQLQuery("SELECT * FROM CSTS_T_CASH_POSTING C INNER JOIN CSTS_M_FUNDGROUP F ON C.Acct_Cd=F.Acct_Cd WHERE F.Acct_Grp_Cd='ASPRUI'","CSTS_T_CASH_POSTING",NHibernateUtil.).List <CSTS.Main.CashPosting>();
grdAll.DataSource = cashpostlist;
grdAll.DataBind();
|