IUserSessionCompositeGetT, TManager Method Ingeniux CMS Content Store API

Retrieves an entity with given ID and objects related to the entity. The includeExpression defines what to include.

Namespace: Ingeniux.CMS
Assembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 9.0.565.0 (9.0.565)
Syntax

T CompositeGet<T, TManager>(
	string id,
	TManager manager,
	params Expression<Func<T, Object>>[] includeExpressions
)
where T : new(), Entity<TManager>
where TManager : ITransactionalEntity

Parameters

id
Type: SystemString
Unique ID of the entity to retrieve.
manager
Type: TManager
The manager that retrieves the entity.
includeExpressions
Type: System.Linq.ExpressionsExpressionFuncT, Object
The callbacks that determine which additional objects are retrieved.

Type Parameters

T
Type of the entity to retrieve. The entity must be a non-abstract type that implements the IEntityTManager interface.
TManager
The entity's manager type, which must implement ITransactionalEntity.

Return Value

Type: T
Returns the object with a matching ID. Returns null 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. At the same time, included objects are retireved to reduce content-store calls.
Remarks

The purpose of this method is to load objects that are returns on properties for given entity. Therefore, when calling the properties of an entity, no additional calls to the content store are required. Callbacks with too many additional objects will slow loading time for the specified entity.
See Also

Reference