Loads an entity of the given type EntityType specified by its id. The id can be a simple or multipart value. For each entity you can choose to load only Id fields, or all single value fields, or all multivalue fields, or all temporal fields, or any combination of the the above mentioned cases.

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

Syntax

C#
void LoadEntityFields<EntityType>(
	EntityLoadOption loadOption,
	Object id,
	params Object[] otherIdParts
)
where EntityType : new(), Entity, IEntity, IDataWrapper
Visual Basic
Sub LoadEntityFields(Of EntityType As {New, Entity, IEntity, IDataWrapper}) ( _
	loadOption As EntityLoadOption, _
	id As Object, _
	ParamArray otherIdParts As Object() _
)

Parameters

loadOption
Type: Aspectize.Core..::..EntityLoadOption
A bitmask comprised of one or more EntityLoadOption which determines which fields to load.
id
Type: System..::..Object
Either a simple value or the first part of a multipart value.
otherIdParts
Type: array<System..::..Object>[]()[][]
The second and onwards parts of a multipart value.

Type Parameters

EntityType
Type of Entity to load

Remarks

all fields that are not loaded must be nullable.

Examples

CopyC#
dm.LoadEntityFields<AdventureWorks.Production.Product>(EntityLoadOption.SingleValueFields | EntityLoadOption.MultipleValueFields, 318);
CopyVB.NET
dm.LoadEntityFields(Of AdventureWorks.Production.Product)(EntityLoadOption.SingleValueFields Or EntityLoadOption.MultipleValueFields, 318)

See Also