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
    System.Int32

    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
    System.String contentTypeAlias
    Returns
    Type Description
    System.Int32
    View Source

    CountChildren(Int32, 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
    System.Int32 parentId
    System.String contentTypeAlias
    Returns
    Type Description
    System.Int32
    View Source

    CountDescendants(Int32, 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
    System.Int32 parentId
    System.String contentTypeAlias
    Returns
    Type Description
    System.Int32
    View Source

    DeleteVersion(Int32)

    Deletes a version.

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

    DeleteVersions(Int32, DateTime)

    Deletes all versions older than a date.

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

    GetAllVersions(Int32)

    Gets versions.

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

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

    View Source

    GetAllVersionsSlim(Int32, Int32, Int32)

    Gets versions.

    Declaration
    IEnumerable<TEntity> GetAllVersionsSlim(int nodeId, int skip, int take)
    Parameters
    Type Name Description
    System.Int32 nodeId
    System.Int32 skip
    System.Int32 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>, Int64, Int32, out Int64, 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
    System.Int64 pageIndex
    System.Int32 pageSize
    System.Int64 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
    System.Nullable<IEnumerable<TEntity>>
    View Source

    GetVersion(Int32)

    Gets a version.

    Declaration
    TEntity GetVersion(int versionId)
    Parameters
    Type Name Description
    System.Int32 versionId
    Returns
    Type Description
    TEntity
    View Source

    GetVersionIds(Int32, Int32)

    Gets version identifiers.

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

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

    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • RecycleBinId
    • Methods
      • CheckDataIntegrity(ContentDataIntegrityReportOptions)
      • Count(String)
      • CountChildren(Int32, String)
      • CountDescendants(Int32, String)
      • DeleteVersion(Int32)
      • DeleteVersions(Int32, DateTime)
      • GetAllVersions(Int32)
      • GetAllVersionsSlim(Int32, Int32, Int32)
      • GetPage(IQuery<TEntity>, Int64, Int32, out Int64, IQuery<TEntity>, Ordering)
      • GetRecycleBin()
      • GetVersion(Int32)
      • GetVersionIds(Int32, Int32)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX