To keep my queries self-contained and potentially reusable, I tended
to do this in NH2:

public class FeaturedCarFinder : DetachedCriteria
{
    public FeaturedCarFinder(int maxResults) : base(typeof(Car))
    {
        Add(Restrictions.Eq("IsFeatured", true));
        SetMaxResults(maxResults);
        SetProjection(BuildProjections());
        SetResultTransformer(typeof(CarViewModelMessage));
    }
}

I'd like to use QueryOver now that I've moved to NH3, but I'm not sure
how to do the above using QueryOver?

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to