Let me first deal with this: I know that SessionFactory is immutable - I am trying to change the configuration at runtime and restore ISessionFactory.
In particular, I have a mapped client that will have some fields added to its dynamic node component at runtime. I would like to do something like this
var newSessionFactory = previousConfiguration
.RemoveClassMapping(typeof(Customer))
.AddXmlString(newMappingForCustomer)
.BuildSessionFactory();
However, I don't see an obvious way to remove the mapping, is there anything I can do without regenerating the whole configuration?
source
share