Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IMemberGroupService

    Defines the MemberGroupService, which provides operations for managing IMemberGroup objects.

    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IMemberGroupService : IService

    Methods

    View Source

    CreateAsync(IMemberGroup)

    Creates a new IMemberGroup object

    Declaration
    Task<Attempt<IMemberGroup?, MemberGroupOperationStatus>> CreateAsync(IMemberGroup memberGroup)
    Parameters
    Type Name Description
    IMemberGroup memberGroup

    IMemberGroup to create

    Returns
    Type Description
    Task<Attempt<IMemberGroup, MemberGroupOperationStatus>>

    An attempt with a status of whether the operation was successful or not, and the created object if it succeeded.

    View Source

    DeleteAsync(Guid)

    Deletes a IMemberGroup by removing it and its usages from the db

    Declaration
    Task<Attempt<IMemberGroup?, MemberGroupOperationStatus>> DeleteAsync(Guid key)
    Parameters
    Type Name Description
    Guid key

    The key of the IMemberGroup to delete

    Returns
    Type Description
    Task<Attempt<IMemberGroup, MemberGroupOperationStatus>>

    An attempt with a status of whether the operation was successful or not, and the deleted object if it succeeded.

    View Source

    GetAllAsync()

    Gets all member groups

    Declaration
    Task<IEnumerable<IMemberGroup>> GetAllAsync()
    Returns
    Type Description
    Task<IEnumerable<IMemberGroup>>

    An enumerable list of IMemberGroup objects.

    View Source

    GetAsync(IEnumerable<Guid>)

    Gets member groups by their keys.

    Declaration
    Task<IEnumerable<IMemberGroup>> GetAsync(IEnumerable<Guid> keys)
    Parameters
    Type Name Description
    IEnumerable<Guid> keys

    The keys of the member groups to get.

    Returns
    Type Description
    Task<IEnumerable<IMemberGroup>>

    An enumerable list of matching IMemberGroup objects.

    Remarks

    The default implementation fetches all groups and filters in-memory. Implementations backed by a query-capable store may provide a more efficient override.

    View Source

    GetAsync(Guid)

    Get a member group by key.

    Declaration
    Task<IMemberGroup?> GetAsync(Guid key)
    Parameters
    Type Name Description
    Guid key

    System.Guid of the member group to get.

    Returns
    Type Description
    Task<IMemberGroup>

    A IMemberGroup object.

    View Source

    GetByIdsAsync(IEnumerable<int>)

    Gets a list of member groups with the given ids.

    Declaration
    Task<IEnumerable<IMemberGroup>> GetByIdsAsync(IEnumerable<int> ids)
    Parameters
    Type Name Description
    IEnumerable<int> ids

    An enumerable list of int ids, to get the member groups by.

    Returns
    Type Description
    Task<IEnumerable<IMemberGroup>>

    An enumerable list of IMemberGroup objects.

    View Source

    GetByName(string?)

    Gets a member group by its name.

    Declaration
    IMemberGroup? GetByName(string? name)
    Parameters
    Type Name Description
    string name

    The name of the member group.

    Returns
    Type Description
    IMemberGroup

    The IMemberGroup if found; otherwise, null.

    View Source

    GetByNameAsync(string)

    Get a member group by name.

    Declaration
    Task<IMemberGroup?> GetByNameAsync(string name)
    Parameters
    Type Name Description
    string name

    Name of the member group to get.

    Returns
    Type Description
    Task<IMemberGroup>

    A IMemberGroup object.

    View Source

    UpdateAsync(IMemberGroup)

    Updates IMemberGroup object

    Declaration
    Task<Attempt<IMemberGroup?, MemberGroupOperationStatus>> UpdateAsync(IMemberGroup memberGroup)
    Parameters
    Type Name Description
    IMemberGroup memberGroup

    IMemberGroup to create

    Returns
    Type Description
    Task<Attempt<IMemberGroup, MemberGroupOperationStatus>>

    An attempt with a status of whether the operation was successful or not, and the object.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX