你的位置: 码友网首页 / 资讯源列表 / Using scoped services inside a Quartz.NET hosted service with ASP.NET Core

关于[Using scoped services inside a Quartz.NET hosted service with ASP.NET Core]的摘要:

In my previous post I showed how you can create a Quartz.NET hosted service with ASP.NET Core and use it to run background tasks on a schedule. Unfortunately, due to the way way the Quartz.NET API works, using Scoped dependency injection services in your Quartz jobs is somewhat cumbersome. In this post I show one way to make it easier to use scoped services in your jobs. You can use the same approach for managing "unit-of-work" patterns with EF Core, and other cross-cutting concerns.

原文地址: https://andrewlock.net/using-scoped-services-inside-a-quartz-net-hosted-service-with-asp-net-core/

收录时间: 2019-05-29 浏览量: 1829 分类: ASP.NET Core

| 0 收藏 | 0