SqlFunction #NHibernate
var prop = Projections.Property(propExpression); var criteria = Restrictions.Or(Restrictions.IsNull(prop), Restrictions.Eq(Projections.SqlFunction("trim", NHibernateUtil.String, prop), ""));