Hi guy,
I can't figure out how to get this and get the order too, I've tried adding order by at the end of the hql but it didn't work. So my question is, given this code which it works perfectly, how can I specify the order parameter so I can achieve the server side paging correctly.
Code:
IList results = CurrentSession.CreateMultiQuery()
.Add(CurrentSession.CreateQuery("from Trial where TrialsKey > :id")
.SetFirstResult(FirstRow)
.SetMaxResults(20)
.SetInt32("id", FirstRow))
.Add("select count(*) from Trial")
.List();
IList items = (IList)results[0];
recordCount = ((IList)results[1])[0].ToString();
return items;