Activities of "hemanshams"

or User Organization Unit and its dependent Organization Unit in the hierarchy,

Hi, you can use the IdentityUserAppService's GetOrganizationUnitsAsync(Guid id) to get a user's all organization units. The result will be List<OrganizationUnitDto> and you can see the parentId's of the related organization units. If it's null, then it means it's a root organization unit.

Regards.

thanks for your attention to this question,

this method is perfect for finding user's Organization Unit.

but i need change filter type of my Entity from "equal" to "contain" as i need in business AppService, (i implement OU as same as this document)

i mean: Situation 1: AppService1 gets data from my Entity with eaual filter type (set in DbContext Filter for OU) for current user's Organization Unit. Situation 2: AppService2 gets data from my Entity with contains filter type for List of user's Organization Unit and its hierarchy units.

please give me additional information about above situations.

Best Regards.

  • ABP Framework version: v8.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server)

Hi abp support team, I read the documents about Organization Unit and filtering data (Doc1, Doc2) , and implement this with following steps:

  1. create IHasOrganizationUnit interface with property OrganizationUnitId
  2. create entity SampleEntity and implement the interface
  3. develop Filter in DbContext and add equal expresion to this filter
  4. develop ShouldFilterEntity for disabling and enabling this filter
  5. create Sample AppService class and implement GetList of data

now i can filter data with User Organization Unit in the appService as well.

Question: Is there any way that i can change filterType in AppService and filter data for:

  • list of OrganizationUnit, as List of User's Organization Units,
  • or User Organization Unit and its dependent Organization Unit in the hierarchy,
  • or something else?

Thanks

Showing 1 to 2 of 2 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 13, 2025, 04:08