.NET FAQs Unleashed!
 
    
    

What is a dependency injection?

It is a design pattern, the purpose of which is to reduce the dependency between software components in an application or system. It is similar to the factory pattern. When a dependency injection pattern is used, an object does not need to be aware of what the other part of the system is all about. Rather, the developer injects the required system components in advance along with a ruleset that will perform in a particular fashion.

A dependency injection pattern is composed of three things:

  • A dependency consumer
  • A definition of the service dependency
  • An injector
ASP.NET Expression Symbols   Web Service in ASP.NET   Pass data to Web Control   Zipping a folder in ASP.NET   Check user online or offline   Display Dynamic Tooltips   Dynamic Server Side Tables   Capture Gridview Row Index   Improve ASP.NET Performance   Refresh page in another page   Step into DLL Source Code   Insert Non-Ascii Characters in a Database   Contract in WCF   Dependency Injection   Asp.net triggering a Postback   Cyclomatic Complexity   ~ Character in ASP.NET   Web Application Project VS. Website Project   Optimistic Locking VS. Pessimistic Locking   System.Net.Mail VS. System.Web.Mail   Breakpoints in debugging  

More Interview Questions...