I have my NHibernateUtil class in the infrastructure layer of my application, however I arrive at a problem with this line:
...
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Computer>());
For this to work I have to expose the domain layer to the infrastructure layer. The domain layer also has access to the infrastructure layer due to the mappings (e.g. ComputerMapping) and this causes a circular dependency.
How does one tell configure FluentNHibernate to access the correct assembly without giving the infrastructure layer access to the domain layer?