public void Dispose() { if (_targetTenantId != null) { _targetTenantRepository.EndSession(_targetTenantId.Value); } }