Class EntityService
Inheritance
System.Object
Assembly: cs.temp.dll.dll
Syntax
public class EntityService : RepositoryService
Constructors
EntityService(IScopeProvider, ILoggerFactory, IEventMessagesFactory, IIdKeyMap, IEntityRepository)
Declaration
public EntityService(IScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IIdKeyMap idKeyMap, IEntityRepository entityRepository)
Parameters
Type |
Name |
Description |
IScopeProvider |
provider |
|
ILoggerFactory |
loggerFactory |
|
IEventMessagesFactory |
eventMessagesFactory |
|
IIdKeyMap |
idKeyMap |
|
IEntityRepository |
entityRepository |
|
Methods
Exists(Guid)
Declaration
public bool Exists(Guid key)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
Returns
Type |
Description |
System.Boolean |
|
Exists(Int32)
Declaration
public bool Exists(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Boolean |
|
Get(Guid)
Declaration
public IEntitySlim Get(Guid key)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
Returns
Type |
Description |
IEntitySlim |
|
Get(Guid, UmbracoObjectTypes)
Declaration
public IEntitySlim Get(Guid key, UmbracoObjectTypes objectType)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
UmbracoObjectTypes |
objectType |
|
Returns
Type |
Description |
IEntitySlim |
|
Get(Int32)
Declaration
public IEntitySlim Get(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
IEntitySlim |
|
Get(Int32, UmbracoObjectTypes)
Declaration
public virtual IEntitySlim Get(int id, UmbracoObjectTypes objectType)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
UmbracoObjectTypes |
objectType |
|
Returns
Type |
Description |
IEntitySlim |
|
Get<T>(Guid)
Declaration
public virtual IEntitySlim Get<T>(Guid key)
where T : IUmbracoEntity
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
Returns
Type |
Description |
IEntitySlim |
|
Type Parameters
Get<T>(Int32)
Declaration
public virtual IEntitySlim Get<T>(int id)
where T : IUmbracoEntity
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
IEntitySlim |
|
Type Parameters
GetAll(Guid)
Declaration
public virtual IEnumerable<IEntitySlim> GetAll(Guid objectType)
Parameters
Type |
Name |
Description |
System.Guid |
objectType |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
GetAll(Guid, Guid[])
Declaration
public virtual IEnumerable<IEntitySlim> GetAll(Guid objectType, params Guid[] keys)
Parameters
Type |
Name |
Description |
System.Guid |
objectType |
|
System.Guid[] |
keys |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
GetAll(Guid, Int32[])
Declaration
public virtual IEnumerable<IEntitySlim> GetAll(Guid objectType, params int[] ids)
Parameters
Type |
Name |
Description |
System.Guid |
objectType |
|
System.Int32[] |
ids |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
GetAll(UmbracoObjectTypes)
Declaration
public virtual IEnumerable<IEntitySlim> GetAll(UmbracoObjectTypes objectType)
Parameters
Type |
Name |
Description |
UmbracoObjectTypes |
objectType |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
GetAll(UmbracoObjectTypes, Guid[])
Declaration
public IEnumerable<IEntitySlim> GetAll(UmbracoObjectTypes objectType, Guid[] keys)
Parameters
Type |
Name |
Description |
UmbracoObjectTypes |
objectType |
|
System.Guid[] |
keys |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
GetAll(UmbracoObjectTypes, Int32[])
Declaration
public virtual IEnumerable<IEntitySlim> GetAll(UmbracoObjectTypes objectType, params int[] ids)
Parameters
Type |
Name |
Description |
UmbracoObjectTypes |
objectType |
|
System.Int32[] |
ids |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
GetAll<T>()
Declaration
public virtual IEnumerable<IEntitySlim> GetAll<T>()
where T : IUmbracoEntity
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
Type Parameters
GetAll<T>(Guid[])
Declaration
public virtual IEnumerable<IEntitySlim> GetAll<T>(params Guid[] keys)
where T : IUmbracoEntity
Parameters
Type |
Name |
Description |
System.Guid[] |
keys |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
Type Parameters
GetAll<T>(Int32[])
Declaration
public virtual IEnumerable<IEntitySlim> GetAll<T>(params int[] ids)
where T : IUmbracoEntity
Parameters
Type |
Name |
Description |
System.Int32[] |
ids |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
Type Parameters
GetAllPaths(UmbracoObjectTypes, Guid[])
Declaration
public virtual IEnumerable<TreeEntityPath> GetAllPaths(UmbracoObjectTypes objectType, params Guid[] keys)
Parameters
Type |
Name |
Description |
UmbracoObjectTypes |
objectType |
|
System.Guid[] |
keys |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TreeEntityPath> |
|
GetAllPaths(UmbracoObjectTypes, Int32[])
Declaration
public virtual IEnumerable<TreeEntityPath> GetAllPaths(UmbracoObjectTypes objectType, params int[] ids)
Parameters
Type |
Name |
Description |
UmbracoObjectTypes |
objectType |
|
System.Int32[] |
ids |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TreeEntityPath> |
|
GetChildren(Int32)
Declaration
public virtual IEnumerable<IEntitySlim> GetChildren(int parentId)
Parameters
Type |
Name |
Description |
System.Int32 |
parentId |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
GetChildren(Int32, UmbracoObjectTypes)
Declaration
public virtual IEnumerable<IEntitySlim> GetChildren(int parentId, UmbracoObjectTypes objectType)
Parameters
Type |
Name |
Description |
System.Int32 |
parentId |
|
UmbracoObjectTypes |
objectType |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
GetDescendants(Int32)
Declaration
public virtual IEnumerable<IEntitySlim> GetDescendants(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
GetDescendants(Int32, UmbracoObjectTypes)
Declaration
public virtual IEnumerable<IEntitySlim> GetDescendants(int id, UmbracoObjectTypes objectType)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
UmbracoObjectTypes |
objectType |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
GetEntityType(Int32)
Declaration
public virtual Type GetEntityType(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
System.Type |
|
GetId(Guid, UmbracoObjectTypes)
Declaration
public Attempt<int> GetId(Guid key, UmbracoObjectTypes objectType)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
UmbracoObjectTypes |
objectType |
|
Returns
Type |
Description |
Attempt<System.Int32> |
|
GetId(Udi)
Declaration
public Attempt<int> GetId(Udi udi)
Parameters
Type |
Name |
Description |
Udi |
udi |
|
Returns
Type |
Description |
Attempt<System.Int32> |
|
GetKey(Int32, UmbracoObjectTypes)
Declaration
public Attempt<Guid> GetKey(int id, UmbracoObjectTypes umbracoObjectType)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
UmbracoObjectTypes |
umbracoObjectType |
|
Returns
Type |
Description |
Attempt<System.Guid> |
|
GetObjectType(IUmbracoEntity)
Declaration
public virtual UmbracoObjectTypes GetObjectType(IUmbracoEntity entity)
Parameters
Type |
Name |
Description |
IUmbracoEntity |
entity |
|
Returns
Type |
Description |
UmbracoObjectTypes |
|
GetObjectType(Guid)
Declaration
public virtual UmbracoObjectTypes GetObjectType(Guid key)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
Returns
Type |
Description |
UmbracoObjectTypes |
|
GetObjectType(Int32)
Declaration
public virtual UmbracoObjectTypes GetObjectType(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
UmbracoObjectTypes |
|
GetPagedChildren(Int32, UmbracoObjectTypes, Int64, Int32, out Int64, IQuery<IUmbracoEntity>, Ordering)
Declaration
public IEnumerable<IEntitySlim> GetPagedChildren(int id, UmbracoObjectTypes objectType, long pageIndex, int pageSize, out long totalRecords, IQuery<IUmbracoEntity> filter = null, Ordering ordering = null)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
UmbracoObjectTypes |
objectType |
|
System.Int64 |
pageIndex |
|
System.Int32 |
pageSize |
|
System.Int64 |
totalRecords |
|
IQuery<IUmbracoEntity> |
filter |
|
Ordering |
ordering |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
GetPagedDescendants(IEnumerable<Int32>, UmbracoObjectTypes, Int64, Int32, out Int64, IQuery<IUmbracoEntity>, Ordering)
Declaration
public IEnumerable<IEntitySlim> GetPagedDescendants(IEnumerable<int> ids, UmbracoObjectTypes objectType, long pageIndex, int pageSize, out long totalRecords, IQuery<IUmbracoEntity> filter = null, Ordering ordering = null)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Int32> |
ids |
|
UmbracoObjectTypes |
objectType |
|
System.Int64 |
pageIndex |
|
System.Int32 |
pageSize |
|
System.Int64 |
totalRecords |
|
IQuery<IUmbracoEntity> |
filter |
|
Ordering |
ordering |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
GetPagedDescendants(Int32, UmbracoObjectTypes, Int64, Int32, out Int64, IQuery<IUmbracoEntity>, Ordering)
Declaration
public IEnumerable<IEntitySlim> GetPagedDescendants(int id, UmbracoObjectTypes objectType, long pageIndex, int pageSize, out long totalRecords, IQuery<IUmbracoEntity> filter = null, Ordering ordering = null)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
UmbracoObjectTypes |
objectType |
|
System.Int64 |
pageIndex |
|
System.Int32 |
pageSize |
|
System.Int64 |
totalRecords |
|
IQuery<IUmbracoEntity> |
filter |
|
Ordering |
ordering |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
GetPagedDescendants(UmbracoObjectTypes, Int64, Int32, out Int64, IQuery<IUmbracoEntity>, Ordering, Boolean)
Declaration
public IEnumerable<IEntitySlim> GetPagedDescendants(UmbracoObjectTypes objectType, long pageIndex, int pageSize, out long totalRecords, IQuery<IUmbracoEntity> filter = null, Ordering ordering = null, bool includeTrashed = true)
Parameters
Type |
Name |
Description |
UmbracoObjectTypes |
objectType |
|
System.Int64 |
pageIndex |
|
System.Int32 |
pageSize |
|
System.Int64 |
totalRecords |
|
IQuery<IUmbracoEntity> |
filter |
|
Ordering |
ordering |
|
System.Boolean |
includeTrashed |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
GetParent(Int32)
Declaration
public virtual IEntitySlim GetParent(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
IEntitySlim |
|
GetParent(Int32, UmbracoObjectTypes)
Declaration
public virtual IEntitySlim GetParent(int id, UmbracoObjectTypes objectType)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
UmbracoObjectTypes |
objectType |
|
Returns
Type |
Description |
IEntitySlim |
|
GetRootEntities(UmbracoObjectTypes)
Declaration
public virtual IEnumerable<IEntitySlim> GetRootEntities(UmbracoObjectTypes objectType)
Parameters
Type |
Name |
Description |
UmbracoObjectTypes |
objectType |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
ReserveId(Guid)
Declaration
public int ReserveId(Guid key)
Parameters
Type |
Name |
Description |
System.Guid |
key |
|
Returns
Type |
Description |
System.Int32 |
|