View Source
Interface IContentRepository<TId, TEntity>
Defines the base implementation of a repository for content items.
Assembly: Umbraco.Core.dll
Syntax
public interface IContentRepository<in TId, TEntity> : IReadWriteQueryRepository<TId, TEntity>, IReadRepository<TId, TEntity>, IWriteRepository<TEntity>, IQueryRepository<TEntity>, IRepository where TEntity : IUmbracoEntity
Type Parameters
Name |
Description |
TId |
|
TEntity |
|
Properties
View Source
RecycleBinId
Gets the recycle bin identifier.
Declaration
int RecycleBinId { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
View Source
CheckDataIntegrity(ContentDataIntegrityReportOptions)
Declaration
ContentDataIntegrityReport CheckDataIntegrity(ContentDataIntegrityReportOptions options)
Parameters
Returns
View Source
Count(String)
Gets the count of content items of a given content type.
Declaration
int Count(string contentTypeAlias = null)
Parameters
Type |
Name |
Description |
System.String |
contentTypeAlias |
|
Returns
Type |
Description |
System.Int32 |
|
View Source
CountChildren(Int32, String)
Gets the count of child content items of a given parent content, of a given content type.
Declaration
int CountChildren(int parentId, string contentTypeAlias = null)
Parameters
Type |
Name |
Description |
System.Int32 |
parentId |
|
System.String |
contentTypeAlias |
|
Returns
Type |
Description |
System.Int32 |
|
View Source
CountDescendants(Int32, String)
Gets the count of descendant content items of a given parent content, of a given content type.
Declaration
int CountDescendants(int parentId, string contentTypeAlias = null)
Parameters
Type |
Name |
Description |
System.Int32 |
parentId |
|
System.String |
contentTypeAlias |
|
Returns
Type |
Description |
System.Int32 |
|
View Source
DeleteVersion(Int32)
Declaration
void DeleteVersion(int versionId)
Parameters
Type |
Name |
Description |
System.Int32 |
versionId |
|
View Source
DeleteVersions(Int32, DateTime)
Deletes all versions older than a date.
Declaration
void DeleteVersions(int nodeId, DateTime versionDate)
Parameters
Type |
Name |
Description |
System.Int32 |
nodeId |
|
DateTime |
versionDate |
|
View Source
GetAllVersions(Int32)
Declaration
IEnumerable<TEntity> GetAllVersions(int nodeId)
Parameters
Type |
Name |
Description |
System.Int32 |
nodeId |
|
Returns
Type |
Description |
IEnumerable<TEntity> |
|
View Source
GetAllVersionsSlim(Int32, Int32, Int32)
Declaration
IEnumerable<TEntity> GetAllVersionsSlim(int nodeId, int skip, int take)
Parameters
Type |
Name |
Description |
System.Int32 |
nodeId |
|
System.Int32 |
skip |
|
System.Int32 |
take |
|
Returns
Type |
Description |
IEnumerable<TEntity> |
|
View Source
GetPage(IQuery<TEntity>, Int64, Int32, out Int64, IQuery<TEntity>, Ordering)
Gets paged content items.
Declaration
IEnumerable<TEntity> GetPage(IQuery<TEntity> query, long pageIndex, int pageSize, out long totalRecords, IQuery<TEntity> filter, Ordering ordering)
Parameters
Type |
Name |
Description |
IQuery<TEntity> |
query |
|
System.Int64 |
pageIndex |
|
System.Int32 |
pageSize |
|
System.Int64 |
totalRecords |
|
IQuery<TEntity> |
filter |
|
Ordering |
ordering |
|
Returns
Type |
Description |
IEnumerable<TEntity> |
|
View Source
GetRecycleBin()
Gets the recycle bin content.
Declaration
IEnumerable<TEntity>? GetRecycleBin()
Returns
Type |
Description |
System.Nullable<IEnumerable<TEntity>> |
|
View Source
GetVersion(Int32)
Declaration
TEntity GetVersion(int versionId)
Parameters
Type |
Name |
Description |
System.Int32 |
versionId |
|
Returns
View Source
GetVersionIds(Int32, Int32)
Gets version identifiers.
Declaration
IEnumerable<int> GetVersionIds(int id, int topRows)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.Int32 |
topRows |
|
Returns
Type |
Description |
IEnumerable<System.Int32> |
|