My legacy system uses two Access database, so I've used separate SessionFactory for each database. I can't use "FluentMapping.AddFromAssemblyOf" function to configure the mappings because the mappings are different for each database.
On one of the session factories, I've used the following code:
gameDataSessionFactory = Fluently.Configure()
.Database(JetDriverConfiguration.Standard
.ConnectionString(dbConfiguration.GameDataConnString.ConnectionString)
.ShowSql())
.Mappings( x => x.FluentMappings.Add<PitchAndEventMap>())
.Mappings(x => x.FluentMappings.Add<GameMap>())
.BuildSessionFactory();
The problem is when the PitchAndEventMap is listed first (like above), the PitchAndEventMap mapping will not work. When it is listed last, it will work but now the mapping for GameMap will not work. Am I missing something here?
There's no error but the program will not do any query. Please help me!
Thanks!