O'Reilly logo

Mastering Ninject for Dependency Injection by Daniel Baharestani

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Meeting Real-world Requirements

This chapter starts with some patterns and antipatterns which should be considered while using Ninject. We will go through the advanced features of Ninject, and also some examples to see how Ninject can meet real-world requirements. By the end of this chapter, the user is expected to know almost all the significant features of Ninject.

The topics covered in this chapter are as follows:

  • DI patterns and antipatterns
  • Multi binding and contextual binding
  • Custom providers
  • Dynamic factories

DI patterns and antipatterns

Dependencies can be injected in a consumer class using different patterns and injecting them into a constructor is just one of them. While there are some patterns that can be followed for injecting ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required