Refactoring: Using object constructors in HQL with NHibernate
Posted by: .Avery Blog,
on 21 Oct 2006 |
View original | Bookmarked: 0 time(s)
We are using NHibernate on a big project at work and one of the optimizations we often find ourselves making is creating a lighter object and returning that instead of our full objects for searches and other operations where we return a large number of the same object. This also applies to searches thatdisplay fields from a hand-full of objects,for instance you might show a Customers first name, last name, their primary address line 1, address zip code, and the date of their last order. You wouldnt...