scenario: I want to introduce an IInitializableModule to ensure the database, this to facilitate a local dev setup. This module needs to run before the built in DataInitialization which ensures the schema.
One option would be to try to run this module before DataInitialization through an ModuleDependencyAttribute overload, but this will complicate the scanning too much I suppose.
Other option is to tweak the order of the modules after InitializationEngine.Initialize() / .Configure(). But again, would be tricky / messy.
Nicer option would be that I can swap a built in module with my own impl. So I inherit DataInitialization, and before I trigger the base code, I do my stuff.
My workaround for the moment is:
implementing IConfigurableModule
attach handler for ConfigurationComplete
ensure database
The disadvantage is that a lot of epi stuff is not yet initialized. For example I want to fetch DataAccessOptions to get the database name, which is not yet available at this moment. So I had to introduce some other bypass code.
Hello,
scenario: I want to introduce an IInitializableModule to ensure the database, this to facilitate a local dev setup. This module needs to run before the built in DataInitialization which ensures the schema.
One option would be to try to run this module before DataInitialization through an ModuleDependencyAttribute overload, but this will complicate the scanning too much I suppose.
Other option is to tweak the order of the modules after InitializationEngine.Initialize() / .Configure(). But again, would be tricky / messy.
Nicer option would be that I can swap a built in module with my own impl. So I inherit DataInitialization, and before I trigger the base code, I do my stuff.
My workaround for the moment is:
The disadvantage is that a lot of epi stuff is not yet initialized. For example I want to fetch DataAccessOptions to get the database name, which is not yet available at this moment. So I had to introduce some other bypass code.
Any thoughts?
Many thanks,
bob