Episode

Dependency Injection Basics in .NET MAUI

with James Montemagno

.NET Multi-platform App UI (.NET MAUI) provides in-built support for using dependency injection. Dependency injection is a specialized version of the Inversion of Control (IoC) pattern, where the concern being inverted is the process of obtaining the required dependency. With dependency injection, another class is responsible for injecting dependencies into an object at runtime. Let's take a look!

Chapters

  • 00:00 - Introduction
  • 00:40 - Sample application overview
  • 01:50 - Explaining why to add dependency injection to the application
  • 02:47 - Registering dependencies for the application
  • 05:30 - Using registered dependencies in pages and ViewModels
  • 06:50 - Demonstrating the updated application
  • 08:05 - Walkthrough of a more complex example with multiple dependencies
  • 09:19 - Wrap up and suggested resources

.NET
.NET MAUI