0
ajayak created
- What is your product version? 9.1
- What is your product type (Angular or MVC)? Angular
- What is product framework type (.net framework or .net core)? .NET Core
How can I get all tenantIds where Edition Feature is Enabled/Avaible with 1 DB Query?
Similar to getting all settings in 1 query:
var settings = await _settingRepository.GetAll().IgnoreQueryFilters()
.Where(c => c.TenantId.HasValue)
.Where(c => c.Name == "MyName")
.Select(c => new { TenantId = c.TenantId.Value, Value = c.Value.ToBool() })
.ToListAsync();
3 Answer(s)
-
0
hi
You can try to switch to the host side to query the tenant directly.
-
0
@maliming, can you please share an example?
-
0
You can use the following three repository to query directly.
private readonly IRepository<TTenant> _tenantRepository; private readonly IRepository<TenantFeatureSetting, long> _tenantFeatureRepository; private readonly IRepository<EditionFeatureSetting, long> _editionFeatureRepository;