Search Results for

    Show / Hide Table of Contents

    Interface IUserService

    Contains methods to manipulate user data

    Namespace: Simplic.User
    Assembly: Simplic.User.dll
    Syntax
    public interface IUserService

    Methods

    | Improve this Doc View Source

    Delete(Int32)

    Deletes a user

    Declaration
    bool Delete(int id)
    Parameters
    Type Name Description
    System.Int32 id

    User id to be deleted.

    Returns
    Type Description
    System.Boolean

    True if successfull

    | Improve this Doc View Source

    GetAll()

    Gets a list of all users

    Declaration
    IEnumerable<User> GetAll()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<User>

    A list of User

    | Improve this Doc View Source

    GetAllSorted(Boolean)

    Gets a list of all users sorted by first name

    Declaration
    IEnumerable<User> GetAllSorted(bool activeOnly = true)
    Parameters
    Type Name Description
    System.Boolean activeOnly

    If set to true, only active user will be selected

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<User>

    A list of User

    | Improve this Doc View Source

    GetApiUser(String, String)

    Get user by apikey and username

    Declaration
    User GetApiUser(string apiKey, string userName)
    Parameters
    Type Name Description
    System.String apiKey

    api key

    System.String userName

    User name

    Returns
    Type Description
    User

    A User

    | Improve this Doc View Source

    GetByExternAccount(String)

    Get the simplic user by an external account name

    Declaration
    User GetByExternAccount(string externAccountName)
    Parameters
    Type Name Description
    System.String externAccountName

    External account name

    Returns
    Type Description
    User

    User id if found

    | Improve this Doc View Source

    GetByGuid(Guid)

    Gets a user by its Guid.

    Declaration
    User GetByGuid(Guid userGuid)
    Parameters
    Type Name Description
    System.Guid userGuid

    guid of the user to search.

    Returns
    Type Description
    User

    A User

    | Improve this Doc View Source

    GetById(Int32)

    Gets a user given by its id

    Declaration
    User GetById(int id)
    Parameters
    Type Name Description
    System.Int32 id

    Id of the user to search

    Returns
    Type Description
    User

    A User

    | Improve this Doc View Source

    GetByName(String)

    Gets a user given by its name

    Declaration
    User GetByName(string userName)
    Parameters
    Type Name Description
    System.String userName

    Name of the user to search

    Returns
    Type Description
    User

    A User

    | Improve this Doc View Source

    Register(User)

    Register new user

    Declaration
    bool Register(User user)
    Parameters
    Type Name Description
    User user

    User instance

    Returns
    Type Description
    System.Boolean

    True if registration was successfull

    | Improve this Doc View Source

    RemoveGroup(Int32, Int32)

    Removes a group from a user

    Declaration
    bool RemoveGroup(int userId, int groupId)
    Parameters
    Type Name Description
    System.Int32 userId

    User Id

    System.Int32 groupId

    Group Id

    Returns
    Type Description
    System.Boolean

    True if successfull

    | Improve this Doc View Source

    RemoveTenant(Int32, Guid)

    Removes a group from a user

    Declaration
    bool RemoveTenant(int userId, Guid tenantId)
    Parameters
    Type Name Description
    System.Int32 userId

    User Id

    System.Guid tenantId

    Tenant Id

    Returns
    Type Description
    System.Boolean

    True if successfull

    | Improve this Doc View Source

    Save(User)

    Inserts or updates a user into the database

    Declaration
    bool Save(User user)
    Parameters
    Type Name Description
    User user

    User to be saved.

    Returns
    Type Description
    System.Boolean

    True if successfull

    | Improve this Doc View Source

    SetGroup(Int32, Int32)

    Assigns a user to a group (updates on existing values)

    Declaration
    bool SetGroup(int userId, int groupId)
    Parameters
    Type Name Description
    System.Int32 userId

    User Id

    System.Int32 groupId

    Group Id

    Returns
    Type Description
    System.Boolean

    True if successfull

    | Improve this Doc View Source

    SetPassword(Int32, String)

    Set new password for a given user

    Declaration
    bool SetPassword(int userId, string rawPassword)
    Parameters
    Type Name Description
    System.Int32 userId

    Current user id

    System.String rawPassword

    Raw password

    Returns
    Type Description
    System.Boolean

    True if setting the password was successfull

    | Improve this Doc View Source

    SetTenant(Int32, Guid)

    Assigns a user to a tenant (updates on existing values)

    Declaration
    bool SetTenant(int userId, Guid tenantId)
    Parameters
    Type Name Description
    System.Int32 userId

    User If

    System.Guid tenantId

    Tenant Id

    Returns
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx