Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IContentRepository<TId, TEntity>

    Defines the base implementation of a repository for content items.

    Namespace: Umbraco.Cms.Core.Persistence.Repositories
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IContentRepository<in TId, TEntity> : IReadWriteQueryRepository<TId, TEntity>, IReadRepository<TId, TEntity>, IWriteRepository<TEntity>, IQueryRepository<TEntity>, IRepository where TEntity : IUmbracoEntity
    Type Parameters
    Name Description
    TId
    TEntity

    Properties

    View Source

    RecycleBinId

    Gets the recycle bin identifier.

    Declaration
    int RecycleBinId { get; }
    Property Value
    Type Description
    int

    Methods

    View Source

    CheckDataIntegrity(ContentDataIntegrityReportOptions)

    Declaration
    ContentDataIntegrityReport CheckDataIntegrity(ContentDataIntegrityReportOptions options)
    Parameters
    Type Name Description
    ContentDataIntegrityReportOptions options
    Returns
    Type Description
    ContentDataIntegrityReport
    View Source

    Count(string?)

    Gets the count of content items of a given content type.

    Declaration
    int Count(string? contentTypeAlias = null)
    Parameters
    Type Name Description
    string contentTypeAlias
    Returns
    Type Description
    int
    View Source

    CountChildren(int, string?)

    Gets the count of child content items of a given parent content, of a given content type.

    Declaration
    int CountChildren(int parentId, string? contentTypeAlias = null)
    Parameters
    Type Name Description
    int parentId
    string contentTypeAlias
    Returns
    Type Description
    int
    View Source

    CountDescendants(int, string?)

    Gets the count of descendant content items of a given parent content, of a given content type.

    Declaration
    int CountDescendants(int parentId, string? contentTypeAlias = null)
    Parameters
    Type Name Description
    int parentId
    string contentTypeAlias
    Returns
    Type Description
    int
    View Source

    DeleteVersion(int)

    Deletes a version.

    Declaration
    void DeleteVersion(int versionId)
    Parameters
    Type Name Description
    int versionId
    View Source

    DeleteVersions(int, DateTime)

    Deletes all versions older than a date.

    Declaration
    void DeleteVersions(int nodeId, DateTime versionDate)
    Parameters
    Type Name Description
    int nodeId
    DateTime versionDate
    View Source

    GetAllVersions(int)

    Gets versions.

    Declaration
    IEnumerable<TEntity> GetAllVersions(int nodeId)
    Parameters
    Type Name Description
    int nodeId
    Returns
    Type Description
    IEnumerable<TEntity>
    Remarks

    Current version is first, and then versions are ordered with most recent first.

    View Source

    GetAllVersionsSlim(int, int, int)

    Gets versions.

    Declaration
    IEnumerable<TEntity> GetAllVersionsSlim(int nodeId, int skip, int take)
    Parameters
    Type Name Description
    int nodeId
    int skip
    int take
    Returns
    Type Description
    IEnumerable<TEntity>
    Remarks

    Current version is first, and then versions are ordered with most recent first.

    View Source

    GetPage(IQuery<TEntity>?, long, int, out long, IQuery<TEntity>?, Ordering?)

    Gets paged content items.

    Declaration
    IEnumerable<TEntity> GetPage(IQuery<TEntity>? query, long pageIndex, int pageSize, out long totalRecords, IQuery<TEntity>? filter, Ordering? ordering)
    Parameters
    Type Name Description
    IQuery<TEntity> query
    long pageIndex
    int pageSize
    long totalRecords
    IQuery<TEntity> filter
    Ordering ordering
    Returns
    Type Description
    IEnumerable<TEntity>
    Remarks

    Here, filter can be null but ordering cannot.

    View Source

    GetRecycleBin()

    Gets the recycle bin content.

    Declaration
    IEnumerable<TEntity> GetRecycleBin()
    Returns
    Type Description
    IEnumerable<TEntity>
    View Source

    GetVersion(int)

    Gets a version.

    Declaration
    TEntity? GetVersion(int versionId)
    Parameters
    Type Name Description
    int versionId
    Returns
    Type Description
    TEntity
    View Source

    GetVersionIds(int, int)

    Gets version identifiers.

    Declaration
    IEnumerable<int> GetVersionIds(int id, int topRows)
    Parameters
    Type Name Description
    int id
    int topRows
    Returns
    Type Description
    IEnumerable<int>
    Remarks

    Current version is first, and then versions are ordered with most recent first.

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