Loads entities following a coherent graph of relations related to a given entity or to all entities of type EntityType. Only single value fields are loaded. Multivalue or temporal fields are not loaded. For loading of multivalue or temporal fields please refer to LoadEntitiesGraphFields methods.

Namespace: Aspectize.Core
Assembly: AspectizeDAL (in AspectizeDAL.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
void LoadEntitiesGraph<EntityType>(
	IEnumerable<IRoleRelationQuery> roleRelations,
	params Object[] ids
)
where EntityType : new(), Entity, IEntity, IDataWrapper
Visual Basic
Sub LoadEntitiesGraph(Of EntityType As {New, Entity, IEntity, IDataWrapper}) ( _
	roleRelations As IEnumerable(Of IRoleRelationQuery), _
	ParamArray ids As Object() _
)

Parameters

roleRelations
Type: System.Collections.Generic..::..IEnumerable<(Of <(<'IRoleRelationQuery>)>)>
The ordered and complete sequence of relations and roles to follow.
ids
Type: array<System..::..Object>[]()[][]
Specifies the id (simple or multipart) of the given the one entity to begin with. If ids is empty all entities and their related entities are loaded.

Type Parameters

EntityType
Type of Entity to load

Examples

CopyC#
List<IRoleRelationQuery> roleRelations = new List<IRoleRelationQuery>();

roleRelations.Add(new RoleRelationQuery<AdventureWorks.Production.ProductCategory, AdventureWorks.Production.ProductSubcategoryProductCategory>());
roleRelations.Add(new RoleRelationQuery<AdventureWorks.Production.ProductSubcategory, AdventureWorks.Production.ProductProductSubcategory>());

dm.LoadEntitiesGraph<AdventureWorks.Production.ProductCategory>(roleRelations, 3);
CopyVB.NET
Dim roleRelations As List(Of IRoleRelationQuery) = New List(Of IRoleRelationQuery)()

roleRelations.Add(New RoleRelationQuery(Of AdventureWorks.Production.ProductCategory, AdventureWorks.Production.ProductSubcategoryProductCategory)())
roleRelations.Add(New RoleRelationQuery(Of AdventureWorks.Production.ProductSubcategory, AdventureWorks.Production.ProductProductSubcategory)())

dm.LoadEntitiesGraph(Of AdventureWorks.Production.ProductCategory)(roleRelations, 3)

See Also