Sign in to confirm you’re not a bot
This helps protect our community. Learn more
Use Dependency Injection (15 of 18) | Building Apps with XAML and .NET MAUI
27Likes
1,345Views
2023Dec 6
Welcome to the Building Apps with XAML and .NET MAUI series. Whether you are new to XAML or simply new to the XAML used in .NET MAUI, this series will show you how to start building a .NET MAUI app. In this episode, Paul shows how to reduce class coupling by using dependency injection. Chapters 0:00 - Introduction 0:55 - Why use dependency injection? 3:20 - How to use it in .NET MAUI apps 5:50 - Service lifetimes 8:00 - Demo of adding it to the app 9:00 - Adding a data layer class library 11:40 - Calling the data layer via dependency injection 15:35 - Discussion 19:55 - Using dependency injection in views and view models 23:15 - Using dependency injection with lists 26:45 - Wrap-up Recommended Resources .NET MAUI Docs: https://learn.microsoft.com/en-us/dot... Paul's code generator: https://github.com/PaulDSheriff/PDSC-... Sample code for this series: https://github.com/PaulDSheriff/VSToo... #visualstudio #softwaredevelopment

Follow along using the transcript.

Microsoft Visual Studio

334K subscribers