Is it possible to use the NHibernate entity-name to "target" a Linq
query at a specific table or view? session.Query<> doesn't take an
entity name parameter. (NHibernate 3.2)

An example scenario: I have a C# class that is mapped to a database
table and a database view. Sometimes I'll need to query the table,
other times I need to query the view. Ideally, I'd like to do
something like this:

var tableResults = session.Query<Person>( "entity-name-for-
table" ).Where( ...);

var viewResults = session.Query<Person>( "entity-name-for-
view" ).Where( ...);

I know the QueryOver<> interface takes an entity-name parameter, but
I'd prefer to use Linq if possible.

Thanks for your help.

-- 
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