View Source
Interface IEntityRepository
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
Returns
View Source
CountByQuery(IQuery<IUmbracoEntity>, Guid, IQuery<IUmbracoEntity>?)
Declaration
int CountByQuery(IQuery<IUmbracoEntity> query, Guid objectType, IQuery<IUmbracoEntity>? filter)
Parameters
Returns
View Source
Exists(IEnumerable<Guid>)
Declaration
bool Exists(IEnumerable<Guid> keys)
Parameters
| Type |
Name |
Description |
| IEnumerable<Guid> |
keys |
|
Returns
View Source
Exists(Guid)
Declaration
Parameters
| Type |
Name |
Description |
| Guid |
key |
|
Returns
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
Parameters
| Type |
Name |
Description |
| int |
id |
|
Returns
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
View Source
Get(Guid, Guid)
Declaration
IEntitySlim? Get(Guid key, Guid objectTypeId)
Parameters
| Type |
Name |
Description |
| Guid |
key |
|
| Guid |
objectTypeId |
|
Returns
View Source
Get(int)
Declaration
Parameters
| Type |
Name |
Description |
| int |
id |
|
Returns
View Source
Get(int, Guid)
Declaration
IEntitySlim? Get(int id, Guid objectTypeId)
Parameters
| Type |
Name |
Description |
| int |
id |
|
| Guid |
objectTypeId |
|
Returns
View Source
GetAll(Guid, params Guid[])
Declaration
IEnumerable<IEntitySlim> GetAll(Guid objectType, params Guid[] keys)
Parameters
| Type |
Name |
Description |
| Guid |
objectType |
|
| Guid[] |
keys |
|
Returns
View Source
GetAll(Guid, params int[])
Declaration
IEnumerable<IEntitySlim> GetAll(Guid objectType, params int[] ids)
Parameters
| Type |
Name |
Description |
| Guid |
objectType |
|
| int[] |
ids |
|
Returns
View Source
GetAllPaths(Guid, params Guid[])
Declaration
IEnumerable<TreeEntityPath> GetAllPaths(Guid objectType, params Guid[] keys)
Parameters
| Type |
Name |
Description |
| Guid |
objectType |
|
| Guid[] |
keys |
|
Returns
View Source
GetAllPaths(Guid, params int[]?)
Declaration
IEnumerable<TreeEntityPath> GetAllPaths(Guid objectType, params int[]? ids)
Parameters
| Type |
Name |
Description |
| Guid |
objectType |
|
| int[] |
ids |
|
Returns
View Source
GetByQuery(IQuery<IUmbracoEntity>)
Gets entities for a query
Declaration
IEnumerable<IEntitySlim> GetByQuery(IQuery<IUmbracoEntity> query)
Parameters
Returns
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
Returns
View Source
GetObjectType(Guid)
Declaration
UmbracoObjectTypes GetObjectType(Guid key)
Parameters
| Type |
Name |
Description |
| Guid |
key |
|
Returns
View Source
GetObjectType(int)
Declaration
UmbracoObjectTypes GetObjectType(int id)
Parameters
| Type |
Name |
Description |
| int |
id |
|
Returns
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
Returns
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
Returns
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
Parameters
| Type |
Name |
Description |
| Guid |
key |
|
Returns