Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IUserDataService

    Defines the user data service, which provides operations for managing user-specific data entries.

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

    Methods

    View Source

    CreateAsync(IUserData)

    Creates a new user data entry.

    Declaration
    Task<Attempt<IUserData, UserDataOperationStatus>> CreateAsync(IUserData userData)
    Parameters
    Type Name Description
    IUserData userData

    The IUserData to create.

    Returns
    Type Description
    Task<Attempt<IUserData, UserDataOperationStatus>>

    A task that represents the asynchronous operation. The task result contains an Attempt<TResult, TStatus> with the created user data and operation status.

    View Source

    DeleteAsync(Guid)

    Deletes a user data entry by its unique key.

    Declaration
    Task<Attempt<UserDataOperationStatus>> DeleteAsync(Guid key)
    Parameters
    Type Name Description
    Guid key

    The unique key of the user data to delete.

    Returns
    Type Description
    Task<Attempt<UserDataOperationStatus>>

    A task that represents the asynchronous operation. The task result contains an Attempt<TResult> with the operation status.

    View Source

    GetAsync(Guid)

    Gets user data by its unique key.

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

    The unique key of the user data.

    Returns
    Type Description
    Task<IUserData>

    A task that represents the asynchronous operation. The task result contains the IUserData if found; otherwise, null.

    View Source

    GetAsync(int, int, IUserDataFilter?)

    Gets a paged collection of user data with optional filtering.

    Declaration
    Task<PagedModel<IUserData>> GetAsync(int skip, int take, IUserDataFilter? filter = null)
    Parameters
    Type Name Description
    int skip

    The number of items to skip.

    int take

    The number of items to take.

    IUserDataFilter filter

    Optional filter to apply to the query.

    Returns
    Type Description
    Task<PagedModel<IUserData>>

    A task that represents the asynchronous operation. The task result contains a PagedModel<T> of IUserData.

    View Source

    UpdateAsync(IUserData)

    Updates an existing user data entry.

    Declaration
    Task<Attempt<IUserData, UserDataOperationStatus>> UpdateAsync(IUserData userData)
    Parameters
    Type Name Description
    IUserData userData

    The IUserData to update.

    Returns
    Type Description
    Task<Attempt<IUserData, UserDataOperationStatus>>

    A task that represents the asynchronous operation. The task result contains an Attempt<TResult, TStatus> with the updated user data and operation status.

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