Access level of mapping classes
Is there a reason why FluentMappings.AddFromAssembly() doesn't add classes with internal access?
Side note: the method responsible for this is actually FluentNHibernate.PersistenceModel.AddMappingsFromAssembly(). It uses Assembly.GetExportedTypes() method, which gets the public types and public nested types of public types.
I'd like to make mapping classes internal - no need to expose them. But then I have to add every mapping separatelly with FluentMappings.Add(). Is there another way to add all types at once?
PS. Thanks for FHN! A fantastic tool!
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Paul Batum on 28 Feb, 2010 01:17 PM
If you look at persistence model, there is another method called AddMappingsFromSource, which takes an ITypeSource. It should be trivial to make your own type source and pass it through.
And then:
James Gregory resolved this discussion on 18 Mar, 2010 12:17 PM.