Presentation is loading. Please wait.

Presentation is loading. Please wait.

 Who I am  What is NHibernate? ◦ Object Relational Mapper ◦ A framework for building advanced frameworks ◦ Ported from Java ◦ A wide NHibernate ecosystem.

Similar presentations


Presentation on theme: " Who I am  What is NHibernate? ◦ Object Relational Mapper ◦ A framework for building advanced frameworks ◦ Ported from Java ◦ A wide NHibernate ecosystem."— Presentation transcript:

1

2  Who I am  What is NHibernate? ◦ Object Relational Mapper ◦ A framework for building advanced frameworks ◦ Ported from Java ◦ A wide NHibernate ecosystem now exists ◦ Why ORMs?

3  Download and add necessaryreferences  Intellisense  Show common exceptions  Configure mapping files  Configure configuration files  Create repository

4 ITransaction ISession ISessionFactory Configuration IUserType ICompositeUserType Statistics IInterceptor IEventListener Custom defined mappings Interception Instrumentation Core API IQuery ICriteria Querying

5  Many-to-one  Cascading  One-to-many  Components  Assigned keys

6  Table per class hierarchy ◦ One table represents an aggregate ◦ Simple and good performance wise ◦ Loss of not-null constraints  Table per concrete class ◦ One table for each non-abstract class ◦ Can be problematic for polymorphic queries  Table per subclass ◦ Completely normalised ◦ Polymorphic queries possible

7  NamingStrategy  IUserType  ICompositeUserType  Should be an exception more that the rule

8  Event listeners  Interceptors ◦ Refer to empty interceptor implementation ◦ Refer to profiler interceptor setting

9  HQL  ICriteria API  Query By Example (QBE)  Linq to NHibernate  Straight SQL

10  New feature added at NHibernate 2.0  Exists at both SessionFactory and Session  Must turn statistics on, off by default  Refer to SessionFactoryStatisticsBuilder

11  First level Caching ◦ Default caching level ◦ Caching at the session level  Second level Caching ◦ Must be configured at Configuration and entity itself ◦ Caching at the session factory level ◦ Providers such as memcached, nvelocity supported


Download ppt " Who I am  What is NHibernate? ◦ Object Relational Mapper ◦ A framework for building advanced frameworks ◦ Ported from Java ◦ A wide NHibernate ecosystem."

Similar presentations


Ads by Google