Loads entities following a coherent graph of relations related to all entities of type EntityType that meet criteria 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,
	QueryCriteria criteria
)
where EntityType : new(), Entity, IEntity, IDataWrapper
Visual Basic
Sub LoadEntitiesGraph(Of EntityType As {New, Entity, IEntity, IDataWrapper}) ( _
	roleRelations As IEnumerable(Of IRoleRelationQuery), _
	criteria As QueryCriteria _
)

Parameters

roleRelations
Type: System.Collections.Generic..::..IEnumerable<(Of <(<'IRoleRelationQuery>)>)>
The ordered and complete sequence of relations and roles to follow.
criteria
Type: Aspectize.Core..::..QueryCriteria
The critiria to meet.

Type Parameters

EntityType
Type of Entity to load

Examples

CopyC#
QueryCriteria criteria = new QueryCriteria(AdventureWorks.Production.ProductSubcategory.Fields.Name, ComparisonOperator.Equal, "Bikes");

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, criteria );
CopyVB.NET
Dim criteria As QueryCriteria = New QueryCriteria(AdventureWorks.Production.ProductSubcategory.Fields.Name, ComparisonOperator.Equal, "Bikes")
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, criteria)

See Also