IUserSessionGetEntityT, TManager Method
|
Retrieves by unique ID from the content store an entity object that implements the
IEntityTManager interface.
Namespace:
Ingeniux.CMS
Assembly:
Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.308
Syntax T GetEntity<T, TManager>(
string id,
TManager manager
)
where T : new(), Entity<TManager>
where TManager : ITransactionalEntity
Function GetEntity(Of T As {New, Entity(Of TManager)}, TManager As ITransactionalEntity) (
id As String,
manager As TManager
) As T
generic<typename T, typename TManager>
where T : gcnew(), Entity<TManager>
where TManager : ITransactionalEntity
T GetEntity(
String^ id,
TManager manager
)
abstract GetEntity :
id : string *
manager : 'TManager -> 'T when 'T : new() and Entity<'TManager> when 'TManager : ITransactionalEntity
Parameters
- id
- Type: SystemString
Unique ID of the entity to retrieve - manager
- Type: TManager
The manager that retrieves the entity.
Type Parameters
- T
- Type of the entity to retrieve, Must be non-abstract type that implements IEntityTManager interface
- TManager
- The entity's manager type, which must implement ITransactionalEntity.
Return Value
Type:
TReturns the object with matching ID.
If an object with a matching ID doesn't exist, the object's type doesn't match the type parameters,
or the object's manager type doesn't match the given manager type,
returns null.
Remarks It is better to use the corresponding manager to retrieve the object.
See Also