Hi,
Can we disable data filters for whole service or module? If yes, how? I need this because I have to disable MayHaveTenant filter at many places.
Thanks
6 Answer(s)
-
0
Does anyone has answer for this?
Thanks
-
0
Hi,
Sory for the late response. This is not possible currenty, you have to manually disable it on unitOfWork.
-
0
Hi,
Is it a good idea to disable tenant filters globally in the DbContext itself?
protected override void OnModelCreating(DbModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.DisableFilterGlobally(AbpDataFilters.MayHaveTenant); modelBuilder.DisableFilterGlobally(AbpDataFilters.MustHaveTenant); }
I have disabled filters globally using above code in DbContext class, but MayHaveTenant filter is still enabled. Any idea why DisableFilterGlobally not working?
Thanks
-
0
Hi,
Please check this issue <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1752">https://github.com/aspnetboilerplate/as ... ssues/1752</a>
-
0
Hi,
I have tried to add below code in EntityFramework and Web project module classe's PreInitiliaze method: In which module's PreInitialize method we need to add below code?
Configuration.UnitOfWork.OverrideFilter(AbpDataFilters.MayHaveTenant, false); Configuration.UnitOfWork.OverrideFilter(AbpDataFilters.MustHaveTenant, false);
But still only MayHaveTenant filter got disabled and MustHaveTenant filter was still enabled.
What I am missing here?
Thanks
-
0
I have reopned this issue <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1752">https://github.com/aspnetboilerplate/as ... ssues/1752</a>. We can continue there.