We are using the Joined Subclass strategy so have a base class with several 
sub classes inheriting from the base class, e.g. Customer base class and 
SuperCustomer inheriting from Customer.

We want to use QueryOver to query the sub classes but then have a generic 
method to apply some common filtering that applies to all of the sub 
classes. So, we might have a query like this:

IQueryOver<SuperCustomer> query = 
Session.QueryOver<SuperCustomer>().Where(sc => sc.IsFantastic);

We then want to pass this query into a generic method to apply some 
additional filters to this query (common filters that apply to properties 
on the base class):

query = query.Where(c => c.IsActive && c.Age > 18);

It feels like there should be an easy way to do this so any help is 
appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to