I am currently writing my own MVC framework for learning purpose and I decided to use a Dependency Injection Container to share common used objects between classes (for example DB instance).
I initialized the container in my bootstrap file and I have a instance of it in my Application
class, is it a good practice to pass an instance of the container during the routing process? (i.e. passing container object as a parameter in ControllerBase
constructor). Also, is it good practice to accept the container as a parameter in the constructor of my ModelBase
?