What would be the best way to implement fluent-nhibernate regarding project architecture?
I have two projects at the moment one for the domain layer and the other is the persistance layer. My problem is that when trying to configure nhibernate I get a circular reference.
The domain references the persistance layer but how do I get the configuration to work without having to reference the domain in the persistance layer i.e. the product class in this line AddFromAssemblyOf()?
Currently my configuration is like this.
return Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2008.ConnectionString(c => c.FromConnectionStringWithKey("DisillStoreConnectionString")))
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Product>()))
.BuildSessionFactory();