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

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Refactor | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1476 | Hits: 163

Similar Posts

  • Using the ObjectContainer in disconnected scenarios Part 2 more
  • NHibnerate : Handling the Special Cases more
  • NHibernate : Some Naked Thoughts more
  • Exposing Custom WCF Headers through WCF Behaviors - Part 2 more
  • ASP.NET MVC HttpModule Registration Under IIS Integrated Mode vs. Classic Mode more
  • New Agile Boot Camp Dates (March 11-13) more
  • Identity Maps more
  • GeoRSS Editor alpha version is up and running more
  • EF: GetRelationTypeExpensiveWay more
  • Querying with LINQ to Entities vs ObjectQuery in EF more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD