Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IEntityContainerRepository

    Represents a repository for EntityContainer entities (folders).

    Namespace: Umbraco.Cms.Core.Persistence.Repositories
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IEntityContainerRepository : IReadRepository<int, EntityContainer>, IWriteRepository<EntityContainer>, IRepository

    Methods

    View Source

    Get(Guid)

    Gets a container by its unique identifier.

    Declaration
    EntityContainer? Get(Guid id)
    Parameters
    Type Name Description
    Guid id

    The unique identifier of the container.

    Returns
    Type Description
    EntityContainer

    The container if found; otherwise, null.

    View Source

    Get(string, int)

    Gets containers by name and level.

    Declaration
    IEnumerable<EntityContainer> Get(string name, int level)
    Parameters
    Type Name Description
    string name

    The name of the containers.

    int level

    The level of the containers in the hierarchy.

    Returns
    Type Description
    IEnumerable<EntityContainer>

    A collection of containers matching the criteria.

    View Source

    HasDuplicateName(Guid, string)

    Checks whether a container with the same name exists under the specified parent.

    Declaration
    bool HasDuplicateName(Guid parentKey, string name)
    Parameters
    Type Name Description
    Guid parentKey

    The unique key of the parent container.

    string name

    The name to check for duplicates.

    Returns
    Type Description
    bool

    true if a duplicate name exists; otherwise, false.

    View Source

    HasDuplicateName(int, string)

    Checks whether a container with the same name exists under the specified parent.

    Declaration
    bool HasDuplicateName(int parentId, string name)
    Parameters
    Type Name Description
    int parentId

    The identifier of the parent container.

    string name

    The name to check for duplicates.

    Returns
    Type Description
    bool

    true if a duplicate name exists; otherwise, false.

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