Dependency injection for .NET APIs [Pt 7] | Back-end Web Development with .NET for Beginners

preview_player
Показать описание

This video covers support for dependency injection in ASP.NET Core and minimal APIs. Dependencies are objects that other objects can depend on; in ASP.NET Core, these are typically implemented as C# classes and interfaces. Dependencies are stored in the service container. Injection is the process by which a referenced dependency is resolved from the service container. This can happen when a class is constructed or in route handlers. In this video, Safia will utilize dependency injection to centralize the logic associated with the task management into a concrete implementation of ITaskService.

Resources:

Chapters:
00:00 - What is dependency injection?
01:12 - Define an interface and create a concrete implementation of the tasks service
02:43 - Register the service in the service container
04:12 - Use the service
06:20 - Validate that app still works
07:25 - Outro

Connect with .NET:

#dotnet #webapi #aspnetcore #visualstudio #visualstudiocode #vscode
Рекомендации по теме
Комментарии
Автор

Editing / compliance taking forty five days to okay this video is just gold.

etexas
Автор

she has a huge future in training, hope they don't stifle her with promotions...

moshtzid
Автор

How are those magical code snippets generated? They are not the standard one

parampalsingh
Автор

I hope you can create multiple class files instead of putting all codes together.
Please demo like the read world development.

rocmewtwo
Автор

Can you share how to integrate it with Azure SQL DB?

samratgupta
join shbcf.ru