This solution provides.
To be used with your domain model.
- Base domain enity.
- Domain repository interface.
To be used with your NHibernate implementation.
- NHibernate Session Manager with SysCache.
- NHibernate domain repository implementation.
- Base fluent NHibernate mapping.
PM> Install-Package Ixoxo.Domain
PM> Install-Package Ixoxo.Nhib
Before you get started you will need to configure the session manager. You will usually do this in your HttpApplication start or init.
NHibernateSessionManager.configure(Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2008
#if DEBUG
.ShowSql()
#endif
.ConnectionString(c => c.Is(ConnectionString)))
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Example>()));