Get an individual item based on the items Id field

Namespace: DotNetNuke.Data
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
T GetById<TProperty, TScopeType>(
	TProperty id,
	TScopeType scopeValue
)
Visual Basic
Function GetById(Of TProperty, TScopeType) ( 
	id As TProperty,
	scopeValue As TScopeType
) As T

Parameters

id
Type: TProperty
The value of the Id field
scopeValue
Type: TScopeType
The value of the scope to filter by

Type Parameters

TProperty
The type of the Id field
TScopeType
The type of the scope field

Return Value

An item

Remarks

This overload should be used to get an item for a specific module instance or for a specific portal dependening on how the items in the repository are scoped. This will allow the relevant cache to be searched first.

See Also