Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IEntityRepository

    Namespace: Umbraco.Cms.Core.Persistence.Repositories
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IEntityRepository : IRepository

    Methods

    View Source

    CountByQuery(IQuery<IUmbracoEntity>, IEnumerable<Guid>, IQuery<IUmbracoEntity>?)

    Declaration
    int CountByQuery(IQuery<IUmbracoEntity> query, IEnumerable<Guid> objectTypes, IQuery<IUmbracoEntity>? filter)
    Parameters
    Type Name Description
    IQuery<IUmbracoEntity> query
    IEnumerable<Guid> objectTypes
    IQuery<IUmbracoEntity> filter
    Returns
    Type Description
    int
    View Source

    CountByQuery(IQuery<IUmbracoEntity>, Guid, IQuery<IUmbracoEntity>?)

    Declaration
    int CountByQuery(IQuery<IUmbracoEntity> query, Guid objectType, IQuery<IUmbracoEntity>? filter)
    Parameters
    Type Name Description
    IQuery<IUmbracoEntity> query
    Guid objectType
    IQuery<IUmbracoEntity> filter
    Returns
    Type Description
    int
    View Source

    Exists(IEnumerable<Guid>)

    Declaration
    bool Exists(IEnumerable<Guid> keys)
    Parameters
    Type Name Description
    IEnumerable<Guid> keys
    Returns
    Type Description
    bool
    View Source

    Exists(Guid)

    Declaration
    bool Exists(Guid key)
    Parameters
    Type Name Description
    Guid key
    Returns
    Type Description
    bool
    View Source

    Exists(Guid, Guid)

    Asserts if an entity with the given object type exists.

    Declaration
    bool Exists(Guid key, Guid objectType)
    Parameters
    Type Name Description
    Guid key

    The Key of the entity to find.

    Guid objectType

    The object type key of the entity.

    Returns
    Type Description
    bool

    True if an entity with the given key and object type exists.

    View Source

    Exists(int)

    Declaration
    bool Exists(int id)
    Parameters
    Type Name Description
    int id
    Returns
    Type Description
    bool
    View Source

    Exists(int, Guid)

    Asserts if an entity with the given object type exists.

    Declaration
    bool Exists(int id, Guid objectType)
    Parameters
    Type Name Description
    int id

    The id of the entity to find.

    Guid objectType

    The object type key of the entity.

    Returns
    Type Description
    bool

    True if an entity with the given id and object type exists.

    View Source

    Get(Guid)

    Declaration
    IEntitySlim? Get(Guid key)
    Parameters
    Type Name Description
    Guid key
    Returns
    Type Description
    IEntitySlim
    View Source

    Get(Guid, Guid)

    Declaration
    IEntitySlim? Get(Guid key, Guid objectTypeId)
    Parameters
    Type Name Description
    Guid key
    Guid objectTypeId
    Returns
    Type Description
    IEntitySlim
    View Source

    Get(int)

    Declaration
    IEntitySlim? Get(int id)
    Parameters
    Type Name Description
    int id
    Returns
    Type Description
    IEntitySlim
    View Source

    Get(int, Guid)

    Declaration
    IEntitySlim? Get(int id, Guid objectTypeId)
    Parameters
    Type Name Description
    int id
    Guid objectTypeId
    Returns
    Type Description
    IEntitySlim
    View Source

    GetAll(Guid, params Guid[])

    Declaration
    IEnumerable<IEntitySlim> GetAll(Guid objectType, params Guid[] keys)
    Parameters
    Type Name Description
    Guid objectType
    Guid[] keys
    Returns
    Type Description
    IEnumerable<IEntitySlim>
    View Source

    GetAll(Guid, params int[])

    Declaration
    IEnumerable<IEntitySlim> GetAll(Guid objectType, params int[] ids)
    Parameters
    Type Name Description
    Guid objectType
    int[] ids
    Returns
    Type Description
    IEnumerable<IEntitySlim>
    View Source

    GetAllPaths(Guid, params Guid[])

    Declaration
    IEnumerable<TreeEntityPath> GetAllPaths(Guid objectType, params Guid[] keys)
    Parameters
    Type Name Description
    Guid objectType
    Guid[] keys
    Returns
    Type Description
    IEnumerable<TreeEntityPath>
    View Source

    GetAllPaths(Guid, params int[]?)

    Declaration
    IEnumerable<TreeEntityPath> GetAllPaths(Guid objectType, params int[]? ids)
    Parameters
    Type Name Description
    Guid objectType
    int[] ids
    Returns
    Type Description
    IEnumerable<TreeEntityPath>
    View Source

    GetByQuery(IQuery<IUmbracoEntity>)

    Gets entities for a query

    Declaration
    IEnumerable<IEntitySlim> GetByQuery(IQuery<IUmbracoEntity> query)
    Parameters
    Type Name Description
    IQuery<IUmbracoEntity> query
    Returns
    Type Description
    IEnumerable<IEntitySlim>
    View Source

    GetByQuery(IQuery<IUmbracoEntity>, Guid)

    Gets entities for a query and a specific object type allowing the query to be slightly more optimized

    Declaration
    IEnumerable<IEntitySlim> GetByQuery(IQuery<IUmbracoEntity> query, Guid objectType)
    Parameters
    Type Name Description
    IQuery<IUmbracoEntity> query
    Guid objectType
    Returns
    Type Description
    IEnumerable<IEntitySlim>
    View Source

    GetObjectType(Guid)

    Declaration
    UmbracoObjectTypes GetObjectType(Guid key)
    Parameters
    Type Name Description
    Guid key
    Returns
    Type Description
    UmbracoObjectTypes
    View Source

    GetObjectType(int)

    Declaration
    UmbracoObjectTypes GetObjectType(int id)
    Parameters
    Type Name Description
    int id
    Returns
    Type Description
    UmbracoObjectTypes
    View Source

    GetPagedResultsByQuery(IQuery<IUmbracoEntity>, ISet<Guid>, long, int, out long, IQuery<IUmbracoEntity>?, Ordering?)

    Declaration
    IEnumerable<IEntitySlim> GetPagedResultsByQuery(IQuery<IUmbracoEntity> query, ISet<Guid> objectTypes, long pageIndex, int pageSize, out long totalRecords, IQuery<IUmbracoEntity>? filter, Ordering? ordering)
    Parameters
    Type Name Description
    IQuery<IUmbracoEntity> query
    ISet<Guid> objectTypes
    long pageIndex
    int pageSize
    long totalRecords
    IQuery<IUmbracoEntity> filter
    Ordering ordering
    Returns
    Type Description
    IEnumerable<IEntitySlim>
    View Source

    GetPagedResultsByQuery(IQuery<IUmbracoEntity>, Guid, long, int, out long, IQuery<IUmbracoEntity>?, Ordering?)

    Gets paged entities for a query and a specific object type

    Declaration
    IEnumerable<IEntitySlim> GetPagedResultsByQuery(IQuery<IUmbracoEntity> query, Guid objectType, long pageIndex, int pageSize, out long totalRecords, IQuery<IUmbracoEntity>? filter, Ordering? ordering)
    Parameters
    Type Name Description
    IQuery<IUmbracoEntity> query
    Guid objectType
    long pageIndex
    int pageSize
    long totalRecords
    IQuery<IUmbracoEntity> filter
    Ordering ordering
    Returns
    Type Description
    IEnumerable<IEntitySlim>
    View Source

    GetSiblings(ISet<Guid>, Guid, int, int, IQuery<IUmbracoEntity>?, Ordering, out long, out long)

    Gets sibling entities of a specified target entity, within a given range before and after the target, ordered as specified.

    Declaration
    IEnumerable<IEntitySlim> GetSiblings(ISet<Guid> objectTypes, Guid targetKey, int before, int after, IQuery<IUmbracoEntity>? filter, Ordering ordering, out long totalBefore, out long totalAfter)
    Parameters
    Type Name Description
    ISet<Guid> objectTypes

    The object type keys of the entities.

    Guid targetKey

    The key of the target entity whose siblings are to be retrieved.

    int before

    The number of siblings to retrieve before the target entity.

    int after

    The number of siblings to retrieve after the target entity.

    IQuery<IUmbracoEntity> filter

    An optional filter to apply to the result set.

    Ordering ordering

    The ordering to apply to the siblings.

    long totalBefore

    Outputs the total number of siblings before the target entity.

    long totalAfter

    Outputs the total number of siblings after the target entity.

    Returns
    Type Description
    IEnumerable<IEntitySlim>

    Enumerable of sibling entities.

    View Source

    GetTrashedSiblings(ISet<Guid>, Guid, int, int, IQuery<IUmbracoEntity>?, Ordering, out long, out long)

    Gets trashed sibling entities of a specified target entity, within a given range before and after the target, ordered as specified.

    Declaration
    IEnumerable<IEntitySlim> GetTrashedSiblings(ISet<Guid> objectTypes, Guid targetKey, int before, int after, IQuery<IUmbracoEntity>? filter, Ordering ordering, out long totalBefore, out long totalAfter)
    Parameters
    Type Name Description
    ISet<Guid> objectTypes

    The object type keys of the entities.

    Guid targetKey

    The key of the target entity whose siblings are to be retrieved.

    int before

    The number of siblings to retrieve before the target entity.

    int after

    The number of siblings to retrieve after the target entity.

    IQuery<IUmbracoEntity> filter

    An optional filter to apply to the result set.

    Ordering ordering

    The ordering to apply to the siblings.

    long totalBefore

    Outputs the total number of siblings before the target entity.

    long totalAfter

    Outputs the total number of siblings after the target entity.

    Returns
    Type Description
    IEnumerable<IEntitySlim>

    Enumerable of trashed sibling entities.

    View Source

    ReserveId(Guid)

    Declaration
    int ReserveId(Guid key)
    Parameters
    Type Name Description
    Guid key
    Returns
    Type Description
    int
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX