I have a scenario, Where i need to apply filter with multiple tenant id for example 👇 #20434
Answered
by
realLiangshiwei
BirajMainali
asked this question in
Q&A
-
I have a scenario, Where i need to apply filter with multiple tenant id for example public class MyRepositoryBase<TEntity>
: EfCoreRepository<AdministrationServiceDbContext, TEntity>
where TEntity : class, IEntity
{
public MyRepositoryBase(IDbContextProvider<AdministrationServiceDbContext> dbContextProvider)
: base(dbContextProvider)
{
}
public override Task<IQueryable<TEntity>> GetQueryableAsync()
{
return base.GetQueryableAsync();
}
private ICompanyIdProvider CompanyIdProvider => LazyServiceProvider.LazyGetRequiredService<ICompanyIdProvider>();
protected override TQueryable ApplyDataFilters<TQueryable, TOtherEntity>(TQueryable query)
{
return QueryableHelper.ApplyCustomQueryFilter<TQueryable, TOtherEntity>(query, DataFilter, CurrentTenant, CompanyIdProvider);
}
} I have override like i mentioned above, It hits the beak point for The |
Beta Was this translation helpful? Give feedback.
Answered by
realLiangshiwei
Aug 8, 2024
Replies: 1 comment
-
you can check this https://abp.io/docs/latest/framework/infrastructure/data-filtering#entityframework-core |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
BirajMainali
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you can check this https://abp.io/docs/latest/framework/infrastructure/data-filtering#entityframework-core