Implemented an API to retrieve a list of organizations provided in the contacts. #64

Merged
vikas.nale merged 1 commits from Ashutosh_Task#317_Get_Organization_List into Feature_Directory 2025-05-21 07:43:24 +00:00
Collaborator
  1. It gets the current tenant ID using _userHelper.GetTenantId() and fetches the logged-in employee details using _userHelper.GetCurrentEmployeeAsync().
  2. It queries the Contacts table, filtering contacts by the current tenant ID.
  3. It selects only the organization field and applies .Distinct() to eliminate duplicates.
  4. The result is materialized into a list with ToListAsync().
  5. A log entry is written indicating which employee fetched the data for which tenant.
  6. Finally, it returns a successful API response containing the list of unique organization names and a message showing how many were found.
1. It gets the current tenant ID using _userHelper.GetTenantId() and fetches the logged-in employee details using _userHelper.GetCurrentEmployeeAsync(). 2. It queries the Contacts table, filtering contacts by the current tenant ID. 3. It selects only the organization field and applies .Distinct() to eliminate duplicates. 4. The result is materialized into a list with ToListAsync(). 5. A log entry is written indicating which employee fetched the data for which tenant. 6. Finally, it returns a successful API response containing the list of unique organization names and a message showing how many were found.
ashutosh.nehete added 1 commit 2025-05-21 04:59:15 +00:00
vikas.nale merged commit a68e1ab74b into Feature_Directory 2025-05-21 07:43:24 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/marco.pms.api#64
No description provided.