public TenantService( IHttpContextAccessor httpContextAccessor, TenantDbContext dbContext, ITenantsBaseRepository repository) : base(dbContext, repository) { _httpContextAccessor = httpContextAccessor; _tenantRepo = repository; _tenants = _tenantRepo.Table.ToList(); if (_httpContextAccessor.HttpContext != null) { _currentTenant = GetTenantByName(); } //else //{ // var tenantid = new Guid("10DEE2B7-DCBA-45E6-8E03-380D27772944"); // default // _currentTenant = GetTenantByTenantId(tenantid); //} }
public TenantEntityService(TenantDbContext dbContext, ITenantsBaseRepository repository) { _dbContext = dbContext; _repository = repository; }