Commonly, an object receives a link to the service location or appeals to some "service locator" and requests a reference to the implementation of a specific type of service. When implementing Dependency Injection, object simply provides a property that is able to keep a reference to the type of service, and when the object is created, a reference to the implementation of the desired type of service is automatically inserted into the property (field).
Dependency Injection is more flexible because it becomes easier to create alternative implementations of this type of service, and then specify exactly which implementation should be used, for example in the configuration file, with no changes in the objects that use this service. This is especially useful in unit testing.
Today I'll show a simple example of managing dependency injection with Autofac. Autofac is an Inversion of Control Container for .NET. It helps to manage dependencies between classes so that applications stay easy to change as they grow in size and complexity. This achieved by treating regular .NET classes as components. You can download Autofac from here.
Our example application is a console program that checks a list of employees and notifies which of them are experts (work experience more than 10 years).