I've tried to add mapping classes manually, by using multiple .Mappings extension calls, but it seems only to include the last one. So how do I add several selected class maps, or multiple assemblies?
My fluent configuration looks typically like this:
Return Fluently.Configure() _
.Database(SQLiteConfiguration.Standard.ConnectionString(connectionString) _
.Cache(Function(c) c.UseQueryCache())) _
.Mappings(Function(m) m.FluentMappings.AddFromAssemblyOf(Of AccountMap)() _
.Conventions.Add(FluentNHibernate.Conventions.Helpers.DefaultLazy.Never())) _
.ExposeConfiguration(Function(c) InlineAssignHelper(cfg, c)) _
.BuildSessionFactory()
Just specify all of your assemblies.
m.FluentMappings
.AddFromAssemblyOf(Of AccountMap)()
.AddFromAssemblyOf(Of SomeOtherMap)();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With