public SingleDbContext( DbContextOptions <SingleDbContext> options, TenantProvider tenantProvider) : base(options) { tenant = tenantProvider.GetTenant(); }
public async Task InvokeAsync(HttpContext context) { var tenant = TenantProvider.GetTenant(); if (tenant.IsUserTenant) { await RequestOrchestrator.RedirectRequestToClient(context, new ApplicationRequest(tenant)); } else { await _next(context); } }