DI or Dependency Injection is a way to write an interface rather than an implementation – IOW, code to an interface or abstraction rather than a concrete implementation. It allows for extensibility and you are not locked in to a particular class. DI is closely related to Inversion of Control(IoC). Instead of a class instantiating a concrete class, it uses a constructor that takes the interfce type a s an argument, and the concreteÂ calss implements that interface is passed to it.
To give you a rundown on what code needs to be added to the WebAPI, here we’ll enumerate the basic process.
Read the rest of the post here: http://www.codeproject.com/Articles/710662/Simplest-Possible-ASP-NET-Web-API-Project-that-Imp