View Source
  Interface IEntityRepository
  
  
  
  
  Assembly: Umbraco.Core.dll
  Syntax
  
    public interface IEntityRepository : IRepository
   
  Methods
  
  
    View Source
  
  CountByQuery(IQuery<IUmbracoEntity>, Guid, IQuery<IUmbracoEntity>)
  
  
  Declaration
  
    virtual int CountByQuery(IQuery<IUmbracoEntity> query, Guid objectType, IQuery<IUmbracoEntity> filter)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
    View Source
  
  CountByQuery(IQuery<IUmbracoEntity>, IEnumerable<Guid>, IQuery<IUmbracoEntity>)
  
  
  Declaration
  
    int CountByQuery(IQuery<IUmbracoEntity> query, IEnumerable<Guid> objectTypes, IQuery<IUmbracoEntity> filter)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
    View Source
  
  Exists(Guid)
  
  
  Declaration
  
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Guid | key |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
    View Source
  
  Exists(Guid, Guid)
  Asserts if an entity with the given object type exists.
Declaration
  
    virtual 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 | 
    
    
      
        | System.Boolean | True if an entity with the given key and object type exists. | 
    
  
  
    View Source
  
  Exists(IEnumerable<Guid>)
  
  
  Declaration
  
    bool Exists(IEnumerable<Guid> keys)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | IEnumerable<Guid> | keys |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
    View Source
  
  Exists(Int32)
  
  
  Declaration
  
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | id |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
    View Source
  
  Exists(Int32, Guid)
  Asserts if an entity with the given object type exists.
Declaration
  
    virtual bool Exists(int id, Guid objectType)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | id | The id of the entity to find. | 
      
        | Guid | objectType | The object type key of the entity. | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean | 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(Int32)
  
  
  Declaration
  
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | id |  | 
    
  
  Returns
  
  
    View Source
  
  Get(Int32, Guid)
  
  
  Declaration
  
    IEntitySlim Get(int id, Guid objectTypeId)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | id |  | 
      
        | Guid | objectTypeId |  | 
    
  
  Returns
  
  
    View Source
  
  GetAll(Guid, Guid[])
  
  
  Declaration
  
    IEnumerable<IEntitySlim> GetAll(Guid objectType, params Guid[] keys)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Guid | objectType |  | 
      
        | Guid[] | keys |  | 
    
  
  Returns
  
  
    View Source
  
  GetAll(Guid, Int32[])
  
  
  Declaration
  
    IEnumerable<IEntitySlim> GetAll(Guid objectType, params int[] ids)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Guid | objectType |  | 
      
        | System.Int32[] | ids |  | 
    
  
  Returns
  
  
    View Source
  
  GetAllPaths(Guid, Guid[])
  
  
  Declaration
  
    IEnumerable<TreeEntityPath> GetAllPaths(Guid objectType, params Guid[] keys)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Guid | objectType |  | 
      
        | Guid[] | keys |  | 
    
  
  Returns
  
  
    View Source
  
  GetAllPaths(Guid, Int32[])
  
  
  Declaration
  
    IEnumerable<TreeEntityPath> GetAllPaths(Guid objectType, params int[] ids)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Guid | objectType |  | 
      
        | System.Int32[] | 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(Int32)
  
  
  Declaration
  
    UmbracoObjectTypes GetObjectType(int id)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | id |  | 
    
  
  Returns
  
  
    View Source
  
  GetPagedResultsByQuery(IQuery<IUmbracoEntity>, Guid, Int64, Int32, out Int64, IQuery<IUmbracoEntity>, Ordering)
  Gets paged entities for a query and a specific object type
Declaration
  
    virtual IEnumerable<IEntitySlim> GetPagedResultsByQuery(IQuery<IUmbracoEntity> query, Guid objectType, long pageIndex, int pageSize, out long totalRecords, IQuery<IUmbracoEntity> filter, Ordering ordering)
   
  Parameters
  
  Returns
  
  
    View Source
  
  GetPagedResultsByQuery(IQuery<IUmbracoEntity>, ISet<Guid>, Int64, Int32, out Int64, 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
  
  ReserveId(Guid)
  
  
  Declaration
  
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Guid | key |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  |