Esempio n. 1
0
        protected override async Task Process()
        {
            using var scope = _serviceScopeFactory.CreateScope();
            var data = _targetService.GetListForWork();

            foreach (var item in data)
            {
                try
                {
                    await ResponseCode(item);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                    throw;
                }
            }
            await ProcessInScope(scope.ServiceProvider);
        }