Using dependency injection as a pattern, we can keep our code cleaner and more testable. This app will use constructor injection, which means that all dependencies that a class has must be passed through its constructor. Autofac then helps out with constructing objects for you so you don't have to care too much about the dependency chain. Let's dive into installing Autofac.
Confused over dependency injection?
Check out the Wiring up a dependency injection through Autofac section in Chapter 2, Building Our First Xamarin.Forms App, for more details on dependency injection.
Check out the Wiring up a dependency injection through Autofac section in Chapter 2, Building Our First Xamarin.Forms App, for more details on dependency injection.