Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IContentServiceBase<TItem>

    Provides a generic base interface for content services.

    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IContentServiceBase<TItem> : IContentServiceBase, IService where TItem : class, IContentBase
    Type Parameters
    Name Description
    TItem

    The type of content item managed by this service.

    Methods

    View Source

    GetById(Guid)

    Gets a content item by its unique identifier.

    Declaration
    TItem? GetById(Guid key)
    Parameters
    Type Name Description
    Guid key

    The unique identifier of the content item.

    Returns
    Type Description
    TItem

    The content item, or null if not found.

    View Source

    Save(IEnumerable<TItem>, int)

    Saves a collection of content items.

    Declaration
    Attempt<OperationResult?> Save(IEnumerable<TItem> contents, int userId = -1)
    Parameters
    Type Name Description
    IEnumerable<TItem> contents

    The content items to save.

    int userId

    The identifier of the user performing the save operation.

    Returns
    Type Description
    Attempt<OperationResult>

    An attempt containing the operation result.

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