Thanks! That solved it :)
So from your example: the chaining:
Code:
results = session.CreateCriteria(typeof(Entry))
.Add(Expression.Lt("ExpiryDate", DateTime.Now))
.AddOrder(Order.Asc("ExpiryDate"))
.CreateCriteria("Status")
.Add(Expression.Not(Expression.Eq("Name", "File")))
.List();
The tiny difference here is that .Equals is a method that always is possible to chain onto any object in the .Net environment. Hence .Eq is what works.
Just a quick question - does this mean that I fetch the whole data set and thereafter filter it, or are the entries filtered via SQL; before being fetched by NHibernate from the data store?