public PerRequestProblemSiteDbContext(DbContextOptions <PerRequestProblemSiteDbContext> options) : base(options) { IServiceProvider serviceProvider = IocManager.Instance.Resolve <IServiceProvider>(); this.perRequestContext = serviceProvider.GetService <IPerRequestContext>(); }
public PerRequestContextMiddlerware(RequestDelegate next, IServiceProvider serviceProvider, ILogger logger) { this.perRequestContext = serviceProvider.GetService(typeof(IPerRequestContext)) as IPerRequestContext; this.logger = logger; this.next = next; }