You could use NH projections to load some kind of DTO (or directly your models).
Some examples here: http://elegantcode.com/2007/10/30/nhibernate-projections/ http://colinramsay.co.uk/diary/2008/01/15/nhibernate-optimising-queries-with-projections/ On Tue, May 24, 2011 at 3:07 PM, harry <[email protected]> wrote: > I only want to see a few of these columns. Unfortunately, these > columns change dynamically depending on what the user wants to see. > But it's a lot faster to just select those columns than selecting all > of them (which is what NHibernate is doing currently), populating the > models, and then displaying just the few properties the user wants. I > just want to select those properties and have the rest of the > properties use their default values. > > I'm currently using the criteria API to build the queries dynamically > as the user can also choose other options on their query. > > -- > 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. > > -- 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.
