Search Results for

    Show / Hide Table of Contents

    Class OrganizationRepository

    Provides data access operations for organization entities.

    Inheritance
    object
    OrganizationRepository
    Implements
    IOrganizationRepository
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OEMS.Core.Infrastructure.Repositories
    Assembly: OEMS.Core.dll
    Syntax
    public class OrganizationRepository : IOrganizationRepository

    Constructors

    OrganizationRepository(IDbContextFactory<OEMSDBContext>)

    Initializes a new instance of the OrganizationRepository class.

    Declaration
    public OrganizationRepository(IDbContextFactory<OEMSDBContext> contextFactory)
    Parameters
    Type Name Description
    IDbContextFactory<OEMSDBContext> contextFactory

    The database context factory for data access operations.

    Methods

    CreateAsync(Organization)

    Declaration
    public Task<Guid> CreateAsync(Organization organization)
    Parameters
    Type Name Description
    Organization organization
    Returns
    Type Description
    Task<Guid>

    CreateEventCategory(EventCategory)

    Declaration
    public Task<bool> CreateEventCategory(EventCategory eventCategory)
    Parameters
    Type Name Description
    EventCategory eventCategory
    Returns
    Type Description
    Task<bool>

    CreateLocation(Location)

    Declaration
    public Task<bool> CreateLocation(Location location)
    Parameters
    Type Name Description
    Location location
    Returns
    Type Description
    Task<bool>

    CreateOrganizationAsync(Organization)

    Creates a new organization in the data store.

    Declaration
    public 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
    public 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
    public 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
    public 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
    public 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
    public 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
    public Task<Organization?> GetOrganizationByIdAsync(Guid organizationId)
    Parameters
    Type Name Description
    Guid organizationId
    Returns
    Type Description
    Task<Organization>

    GetOrganizationIdByDomainAsync(string)

    Declaration
    public Task<Guid> GetOrganizationIdByDomainAsync(string domain)
    Parameters
    Type Name Description
    string domain
    Returns
    Type Description
    Task<Guid>

    GetOrganizationsByUserIdAsync(Guid)

    Declaration
    public Task<IEnumerable<Organization>> GetOrganizationsByUserIdAsync(Guid userId)
    Parameters
    Type Name Description
    Guid userId
    Returns
    Type Description
    Task<IEnumerable<Organization>>

    UpdateAsync(Organization)

    Updates an existing organization in the data store.

    Declaration
    public 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.

    Implements

    IOrganizationRepository
    In this article
    Back to top Generated by DocFX