Finally, I discovered the combination I was looking for!
lvCriteria.Add(Restrictions.Not(Expression.Eq("Msg", string.Empty)));
This combination of constraints and expressions works as expected; narrowing all blank lines. I don’t know why I couldn’t achieve these results even with:
lvCriteria.Add(Restrictions.Not(Restrictions.Eq("Msg", string.Empty)));
Thanks to everyone who tried.
source
share