Where am I going wrong with the count in Hql
- by Bipul
So I only want the count of the results not the results themselves therefore I am using count in hql. So, below is the query
(int) Session.CreateQuery("select count(*) from TableName where Lhs=Rhs").UniqueResult();
But it is giving me the error Specified cast is not valid..
So, can any body tell me how to cast the count to int.
Any help is…