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 SourceExists(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 |
|
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. |
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. |
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, |