Loads an entity of the given type EntityType specified by its id. The id can be a simple or multipart value. You can choose which the fields to load. Warning: all fields that are not loaded must be nullable.

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

Syntax

C#
EntityType GetEntityFields<EntityType>(
	IEnumerable<string> fields,
	Object id,
	params Object[] otherIdParts
)
where EntityType : new(), Entity
Visual Basic (Declaration)
Function GetEntityFields(Of EntityType As {New, Entity}) ( _
	fields As IEnumerable(Of String), _
	id As Object, _
	ParamArray otherIdParts As Object() _
) As EntityType

Parameters

fields
Type: System.Collections.Generic..::.IEnumerable<(Of <(String>)>)
The sequence of all fields to load. The empty sequence loads all simple fields.
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

Return Value

List of EntityType loaded by the queries

See Also