Can I use a Criteria to execute a t-sql command to select the max value for a column in a table?
'select @cus_id = max(id) + 1 from customers'
Ta
Ollie
Use Projection:
session.CreateCriteria(typeof(Customer))
.SetProjection( Projections.Max("Id") )
. UniqueResult();