.NET MAUI Dependency Injection
Tuesday, June 14, 2022
Dependency Injection (DI) is a pattern that we use in continuation of separation of concerns. A class should only be interested in what it is doing, not newing up some other class. Just inject foreign classes into the constructor and be on your way. It’s that simple.
Why? Our app is fairly small right now but as it gets bigger we’ll be thankful for dependency injection. If you look at the MainPage.…