You can use the IProjection and SQL functions in the QueryOver API as follows:
var result = session.QueryOver<User>() .Where(Restrictions.GtProperty( Projections.Property<User>(u => u.CreatedOn), Projections.SqlFunction("current_timestamp", new NHibernate.Type.TimestampType()))) .List();
This will result in the following SQL:
SELECT this_.... FROM [User] this_ WHERE this_.CreatedOn > sysdatetime() ;
source share