Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IRelationRepository

    Namespace: Umbraco.Cms.Core.Persistence.Repositories
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IRelationRepository : IReadWriteQueryRepository<int, IRelation>, IReadRepository<int, IRelation>, IWriteRepository<IRelation>, IQueryRepository<IRelation>, IRepository

    Methods

    View Source

    DeleteByParent(int, params string[])

    Deletes all relations for a parent for any specified relation type alias

    Declaration
    void DeleteByParent(int parentId, params string[] relationTypeAliases)
    Parameters
    Type Name Description
    int parentId
    string[] relationTypeAliases

    A list of relation types to match for deletion, if none are specified then all relations for this parent id are deleted.

    View Source

    GetPagedByChildKeyAsync(Guid, int, int, string?)

    Declaration
    Task<PagedModel<IRelation>> GetPagedByChildKeyAsync(Guid childKey, int skip, int take, string? relationTypeAlias)
    Parameters
    Type Name Description
    Guid childKey
    int skip
    int take
    string relationTypeAlias
    Returns
    Type Description
    Task<PagedModel<IRelation>>
    View Source

    GetPagedChildEntitiesByParentId(int, long, int, out long, params Guid[])

    Declaration
    IEnumerable<IUmbracoEntity> GetPagedChildEntitiesByParentId(int parentId, long pageIndex, int pageSize, out long totalRecords, params Guid[] entityTypes)
    Parameters
    Type Name Description
    int parentId
    long pageIndex
    int pageSize
    long totalRecords
    Guid[] entityTypes
    Returns
    Type Description
    IEnumerable<IUmbracoEntity>
    View Source

    GetPagedParentEntitiesByChildId(int, long, int, out long, params Guid[])

    Declaration
    IEnumerable<IUmbracoEntity> GetPagedParentEntitiesByChildId(int childId, long pageIndex, int pageSize, out long totalRecords, params Guid[] entityTypes)
    Parameters
    Type Name Description
    int childId
    long pageIndex
    int pageSize
    long totalRecords
    Guid[] entityTypes
    Returns
    Type Description
    IEnumerable<IUmbracoEntity>
    View Source

    GetPagedRelationsByQuery(IQuery<IRelation>?, long, int, out long, Ordering?)

    Declaration
    IEnumerable<IRelation> GetPagedRelationsByQuery(IQuery<IRelation>? query, long pageIndex, int pageSize, out long totalRecords, Ordering? ordering)
    Parameters
    Type Name Description
    IQuery<IRelation> query
    long pageIndex
    int pageSize
    long totalRecords
    Ordering ordering
    Returns
    Type Description
    IEnumerable<IRelation>
    View Source

    Save(IEnumerable<IRelation>)

    Persist multiple IRelation at once

    Declaration
    void Save(IEnumerable<IRelation> relations)
    Parameters
    Type Name Description
    IEnumerable<IRelation> relations
    View Source

    SaveBulk(IEnumerable<ReadOnlyRelation>)

    Persist multiple IRelation at once but Ids are not returned on created relations

    Declaration
    void SaveBulk(IEnumerable<ReadOnlyRelation> relations)
    Parameters
    Type Name Description
    IEnumerable<ReadOnlyRelation> relations
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX