mercredi 26 août 2015

ways of using ninject properly in asp.net mvc

One of the definition of ninject in internet is;

"Somewhere in the middle of your application, you're creating a class inside another class. That means you're creating a dependency. Dependency Injection is about passing in those dependencies, usually through the constructor, instead of embedding them."

what i want to learn is, where ever we see a creation of a class inside another class should we use ninject or just we should use in some part of program that we want/need to apply loosely coupling for design purposes because maybe we would like to use different approaches in the future?

Sorry if this is a silly question.

Aucun commentaire:

Enregistrer un commentaire