Answers for "Dependency Injection Create Scope at constructor"

C#
0

Dependency Injection Create Scope at constructor

public ServiceBusQueueListner(ILogger<ServiceBusQueueListner> logger, IServiceProvider serviceProvider, IConfiguration configuration)
        {
            _logger = logger;
            _reportProcessor = serviceProvider.CreateScope().ServiceProvider.GetRequiredService<IReportProcessor>();
            _configuration = configuration;
        }
Posted by: Guest on August-24-2021

Code answers related to "Dependency Injection Create Scope at constructor"

C# Answers by Framework

Browse Popular Code Answers by Language