I am trying to sort decimal or integer column. but while sorting ascending zero is coming last.
the code is:
criteria.AddOrder(Order.Asc(Projections.Cast(NHibernateUtil.Decimal, Projections.Property("cloumn1")))));
output:
35342860
36870852
87654321
213123213
0
0
Any issue in code? or what is solution?
These are most likely null values. You could look at using a conditional restriction or making this a non nullable column with a default of 0, which would seem to be what you are after.
Conditional restriction would be something like this
which if you put in as first ordering will put the nulls at the top and displayed as 0