I have an enumeration of type int in my entity, UserStatus.
I want to get all users where the UserStatus <> Cancelled.
So:
Session.CreateCriteria(typeof(User))
.Add(Expression.Eq("UserStatus", (int)UserStatus.Cancelled)
.UniqueResult<User>();
The above is fore equal, I need to get not equal.