- ABP Framework version: v7.1.0
I've a case where I have api the host need to access to orders (all tenant) and tenat user only own data.
I know that is possible to do that in appliaction/domain but I need to add logic to all calls. My idea is create a second HttpApi and disable datafilter but it doesn't work.
I create a using with UnitOfOwrk and inside of this using a second using disable a data fitler for multitenant but on application service I see tha same GIUD fot unit off work but IMultitenat filtert have filter with IsEnable set to true.
Is it possibile disable filter on HttpApi and propagate to Application/Domain/EF?
4 Answer(s)
- 
    0Hi I follow the documentation but it doesn't work. public class MyBookService : AbpController { private readonly IDataFilter<IMultiTenant> _softDeleteFilter; private readonly IRepository<Book, Guid> _bookRepository; public MyBookService( IDataFilter<IMultiTenant> softDeleteFilter, IRepository<Book, Guid> bookRepository) { _softDeleteFilter = softDeleteFilter; _bookRepository = bookRepository; } [HttpGet] public async Task<List<Book>> GetAllBooksIncludingDeletedAsync() { //Temporary disable the IMultiTenantfilter using (_softDeleteFilter.Disable()) { return await _bookRepository.GetListAsync(); } } }In my application class IMultiTenant is Enable but on HttpApi is disable 
- 
    0Hi we have the following implementation which abp follows https://docs.abp.io/en/abp/latest/Best-Practices/Module-Architecture Create you controller in HttpApi.csproj Project implement and inject you ApplicationService  . .Create **ApplicationService ** in Application.csproj  Create interface of the application service in Application.Shared.csproj  
- 
    0Are you try this code in 7.1.0? 
- 
    0Hi, Yes, can you share you Controller code and application service code?. i see that you have Abpcontroller extended by ApplicationService Class. 
 
                                