If playback doesn't begin shortly, try restarting your device.
•
You're signed out
Videos you watch may be added to the TV's watch history and influence TV recommendations. To avoid this, cancel and sign in to YouTube on your computer.
CancelConfirm
Share
An error occurred while retrieving sharing information. Please try again later.
1,345 views • Dec 6, 2023 • #visualstudio #softwaredevelopment
Show less
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…...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…...more