Interface IOrganizationRepository
Defines the contract for organization data access operations.
Assembly: OEMS.Core.dll
Syntax
public interface IOrganizationRepository
Methods
CreateEventCategory(EventCategory)
Declaration
Task<bool> CreateEventCategory(EventCategory eventCategory)
Parameters
Returns
CreateLocation(Location)
Declaration
Task<bool> CreateLocation(Location location)
Parameters
Returns
CreateOrganizationAsync(Organization)
Creates a new organization in the data store.
Declaration
Task<bool> CreateOrganizationAsync(Organization organization)
Parameters
Type |
Name |
Description |
Organization |
organization |
The organization entity to create.
|
Returns
Type |
Description |
Task<bool> |
A task that represents the asynchronous operation. The task result contains true if the creation was successful; otherwise, false.
|
DeleteAsync(Guid)
Deletes an organization from the data store.
Declaration
Task DeleteAsync(Guid id)
Parameters
Type |
Name |
Description |
Guid |
id |
The unique identifier of the organization to delete.
|
Returns
Type |
Description |
Task |
A task that represents the asynchronous operation.
|
ExistsAsync(Guid)
Checks if an organization exists in the data store.
Declaration
Task<bool> ExistsAsync(Guid id)
Parameters
Type |
Name |
Description |
Guid |
id |
The unique identifier of the organization to check.
|
Returns
Type |
Description |
Task<bool> |
A task that represents the asynchronous operation. The task result contains true if the organization exists; otherwise, false.
|
GetAllDomainsAsync()
Retrieves all domain names from organizations.
Declaration
Task<List<string>> GetAllDomainsAsync()
Returns
Type |
Description |
Task<List<string>> |
A task that represents the asynchronous operation. The task result contains a list of domain names.
|
GetAllOrganizationsAsync()
Retrieves all organizations from the data store.
Declaration
Task<IEnumerable<Organization>> GetAllOrganizationsAsync()
Returns
Type |
Description |
Task<IEnumerable<Organization>> |
A task that represents the asynchronous operation. The task result contains a collection of organization entities.
|
GetByIdAsync(Guid)
Retrieves an organization by its unique identifier.
Declaration
Task<Organization> GetByIdAsync(Guid id)
Parameters
Type |
Name |
Description |
Guid |
id |
The unique identifier of the organization.
|
Returns
Type |
Description |
Task<Organization> |
A task that represents the asynchronous operation. The task result contains the organization entity or null if not found.
|
GetOrganizationByIdAsync(Guid)
Declaration
Task<Organization?> GetOrganizationByIdAsync(Guid organizationId)
Parameters
Type |
Name |
Description |
Guid |
organizationId |
|
Returns
GetOrganizationIdByDomainAsync(string)
Declaration
Task<Guid> GetOrganizationIdByDomainAsync(string domain)
Parameters
Type |
Name |
Description |
string |
domain |
|
Returns
GetOrganizationsByUserIdAsync(Guid)
Declaration
Task<IEnumerable<Organization>> GetOrganizationsByUserIdAsync(Guid userId)
Parameters
Type |
Name |
Description |
Guid |
userId |
|
Returns
UpdateAsync(Organization)
Updates an existing organization in the data store.
Declaration
Task UpdateAsync(Organization organization)
Parameters
Type |
Name |
Description |
Organization |
organization |
The organization entity with updated information.
|
Returns
Type |
Description |
Task |
A task that represents the asynchronous operation.
|