Search Results for

    Show / Hide Table of Contents

    Interface IUserService

    Defines the contract for user management operations in the OEMS system.

    Namespace: OEMS.Core.Application.ApplicationServiceInterfaces
    Assembly: OEMS.Core.dll
    Syntax
    public interface IUserService

    Methods

    AssignRoleAsync(Guid, string)

    Assigns a role to a user.

    Declaration
    Task AssignRoleAsync(Guid userId, string role)
    Parameters
    Type Name Description
    Guid userId

    The unique identifier of the user.

    string role

    The role to assign to the user.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    ChangeDisplayNameAsync(Guid, string)

    Changes the display name of a user.

    Declaration
    Task ChangeDisplayNameAsync(Guid userId, string newName)
    Parameters
    Type Name Description
    Guid userId

    The unique identifier of the user.

    string newName

    The new display name for the user.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    CreateUserAsync(CreateUserDto)

    Creates a new user in the system.

    Declaration
    Task<Guid> CreateUserAsync(CreateUserDto dto)
    Parameters
    Type Name Description
    CreateUserDto dto

    The user creation data transfer object containing user information.

    Returns
    Type Description
    Task<Guid>

    A task that represents the asynchronous operation. The task result contains the newly created user's identifier.

    DeleteUserAsync(Guid)

    Deletes a user from the system.

    Declaration
    Task DeleteUserAsync(Guid userId)
    Parameters
    Type Name Description
    Guid userId

    The unique identifier of the user to delete.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    GetOrganisationUserByIdAsync(Guid, Guid)

    Retrieves a specific user's membership information within an organization.

    Declaration
    Task<MemberDto> GetOrganisationUserByIdAsync(Guid userId, Guid orgaId)
    Parameters
    Type Name Description
    Guid userId

    The unique identifier of the user.

    Guid orgaId

    The unique identifier of the organization.

    Returns
    Type Description
    Task<MemberDto>

    A task that represents the asynchronous operation. The task result contains the member data transfer object.

    GetUserByEmailAsync(string)

    Retrieves a user by their email address.

    Declaration
    Task<UserDto> GetUserByEmailAsync(string email)
    Parameters
    Type Name Description
    string email

    The email address of the user.

    Returns
    Type Description
    Task<UserDto>

    A task that represents the asynchronous operation. The task result contains the user data transfer object.

    GetUserByIdAsync(Guid)

    Retrieves a user by their unique identifier.

    Declaration
    Task<UserDto> GetUserByIdAsync(Guid userId)
    Parameters
    Type Name Description
    Guid userId

    The unique identifier of the user.

    Returns
    Type Description
    Task<UserDto>

    A task that represents the asynchronous operation. The task result contains the user data transfer object.

    GetUsersByOrganizationAsync(Guid)

    Retrieves all users belonging to a specific organization.

    Declaration
    Task<IEnumerable<UserDto>> GetUsersByOrganizationAsync(Guid organizationId)
    Parameters
    Type Name Description
    Guid organizationId

    The unique identifier of the organization.

    Returns
    Type Description
    Task<IEnumerable<UserDto>>

    A task that represents the asynchronous operation. The task result contains a collection of user data transfer objects.

    RemoveRoleAsync(Guid, string)

    Removes a role from a user.

    Declaration
    Task RemoveRoleAsync(Guid userId, string role)
    Parameters
    Type Name Description
    Guid userId

    The unique identifier of the user.

    string role

    The role to remove from the user.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    UpdateUserAsync(UpdateUserDto)

    Updates an existing user's information.

    Declaration
    Task UpdateUserAsync(UpdateUserDto dto)
    Parameters
    Type Name Description
    UpdateUserDto dto

    The user update data transfer object containing updated user information.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    UploadProfilePictureAsync(Guid, FileDto)

    Uploads a profile picture for a user.

    Declaration
    Task UploadProfilePictureAsync(Guid userId, FileDto file)
    Parameters
    Type Name Description
    Guid userId

    The unique identifier of the user.

    FileDto file

    The file data transfer object containing the profile picture information.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    In this article
    Back to top Generated by DocFX