1 / 9

Introduction to NHibernate

Introduction to NHibernate. Mike Hadlow m ikehadlow.blogspot.com mikehadlow@gmail.com Twitter: mikehadlow. What’s in the talk?. A brief history of data access in .NET Why ORMs rule Introduce Nhibernate Demo How to use Nhibernate in a web application Resources.

nora-white
Download Presentation

Introduction to NHibernate

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to NHibernate Mike Hadlow mikehadlow.blogspot.com mikehadlow@gmail.com Twitter: mikehadlow

  2. What’s in the talk? • A brief history of data access in .NET • Why ORMs rule • Introduce Nhibernate • Demo • How to use Nhibernate in a web application • Resources

  3. A brief history of data access in .NET • Classic VB had DAO, RDO, ADO and the recordset • ADO.NET introduced the DataSet • Move to more OO model, hand written DAL • Code generation (Code Smith etc) • Object Relation Mapping (ORM) tools

  4. Why ORMs rule • Productivity • Productivity • Productivity • Did I say productivity?

  5. NHibernate • Port of Hibernate • Natural OO programming model • Supports Persistence Ignorance • Rich mapping • Powerful query options • Open source

  6. Demo

  7. Physical Data Model

  8. How to use Nhibernate in a Web Application • Consider a framework (S#arp) • Create a session factory on application start • Create a session per request • Always use explicit transactions

  9. Resources Nhibernate: https://www.hibernate.org/343.html Fluent Nhibernate: http://fluentnhibernate.org/ NH Profiler: http://nhprof.com/ S#arp Architecture: http://code.google.com/p/sharp-architecture/ Nhibernatein Action

More Related