Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IDomainRepository

    Represents a repository for IDomain entities.

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

    Methods

    View Source

    Exists(string)

    Checks whether a domain with the specified name exists.

    Declaration
    bool Exists(string domainName)
    Parameters
    Type Name Description
    string domainName

    The name of the domain.

    Returns
    Type Description
    bool

    true if a domain with the name exists; otherwise, false.

    View Source

    GetAll(bool)

    Gets all domains.

    Declaration
    IEnumerable<IDomain> GetAll(bool includeWildcards)
    Parameters
    Type Name Description
    bool includeWildcards

    Whether to include wildcard domains.

    Returns
    Type Description
    IEnumerable<IDomain>

    A collection of domains.

    View Source

    GetAssignedDomains(int, bool)

    Gets all domains assigned to a content item.

    Declaration
    IEnumerable<IDomain> GetAssignedDomains(int contentId, bool includeWildcards)
    Parameters
    Type Name Description
    int contentId

    The identifier of the content item.

    bool includeWildcards

    Whether to include wildcard domains.

    Returns
    Type Description
    IEnumerable<IDomain>

    A collection of domains assigned to the content.

    View Source

    GetByName(string)

    Gets a domain by its name.

    Declaration
    IDomain? GetByName(string domainName)
    Parameters
    Type Name Description
    string domainName

    The name of the domain.

    Returns
    Type Description
    IDomain

    The domain if found; otherwise, null.

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