In the command line exe application in the windows service app that I have, there is a main
method and that's where I'm registering all the dependencies using a simple injector IoC
. That's my composition root now. In the same windows service application, there is a OnStart
overridable method. That's where I'm doing an ETL operation.
Where should I keep the composition root? In the main
method or OnStart
?