What’s wrong with the following?
return s.CreateQuery("from CodeCamp c where c.Name = :name order by c.Name")
.SetParameter("name", "test")
.List<codecamp>();
return s.CreateCriteria<codecamp>()
.Add(Expression.Eq("Name", "test"))
.AddOrder(Order.Asc("Name"))
.List<codecamp>();
There are string references to .NET properties. That is a no-no. If there is a typo, you get runtime errors and not compile time errors. Now, good tests would catch it, but if you want the absolute fastest way to catch typos, NHibernate.Linq is the way to go.
return (from camp in s.Linq<codecamp>()
where camp.Name == "test"
orderby camp.Name
select camp).ToList();
With Linq, you get that compile time checking that is going to help you move a little bit faster and make your code more robust. Combine this with Fluent NHibernate and you have a solid solution. Your mappings still have to be correct of course, but these projects take two variables out of the equation and use the compiler as a safety blanket.