ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

.NET Hosted Service: Run a background service and task (uses .NET Core)

ASP.NET Core background service

background service

hosted service

hosted services

ASP.NET Core hosted services

ASP.NET Core hosted service

IHostedService

.NET background service

.NET background services

.NET hosted service

.NET hosted services

BackgroundService

BackgroundService ExecuteAsync

IHostedService StartAsync

hosted service DI

background task

.NET Core background task

.NET Core background service

Автор: Round The Code

Загружено: 2022-01-30

Просмотров: 20132

Описание: You can use a Hosted Service from .NET Core 3.1 and they are an excellent way of running a C# background task.

These background services can be run in an ASP.NET Core web application, which is ideal if you need update data that would affect all users.

We look at how to create a hosted service, and what the difference is between inheriting the IHostedService interface and the BackgroundService abstract class.

In addition, we'll find out the difference between starting a background task using the StartAsync method against the ExecuteAsync method.

Afterwards, we'll demonstrate how to add hosted services to the IServiceCollection.

Finally, we'll see how hosted services reacted with dependency injection, and why hosted services can successfully resolve a singleton and transient service, but not a scoped service.

💻 Download the code example for this demo 💻
https://www.roundthecode.com/dotnet-c...

📖 Learn .NET and C# with our online courses 📖
https://www.roundthecode.com/dotnet-c...

► More information: https://www.roundthecode.com/dotnet-t...

► Chapters
0:00 The hosted services area covered
0:48 Creating a hosted service
2:51 Add a hosted service to IServiceCollection
5:10 How dependency injection works
8:37 Should we use a worker service?

#hostedservice #aspnetcore #dependencyinjection

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
.NET Hosted Service: Run a background service and task (uses .NET Core)

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]