How Do You Implement Specification Pattern for querying database using NHibernate?(without LINQ to NHibernate).I read a lot about Specification Pattern but most of them was about Validation and Querying Memory collection objects.
Best method as far as I know using DetachedCriteria in Specification Interface like this.
interface ISpecification<T> {
bool IsSatisfiedBy(T object);
DetachedCriteria CreateCriteria();
}
Is there any alternative or better way to do this?