Tortuga.Chain Namespace
Tortuga.Chain.CommandBuilders Namespace
Tortuga.Chain.Metadata Namespace

ISupportsGetByKey..::..GetByKey<(Of <(<'TObject, TKey>)>)> Method (TKey)

Gets a record by its primary key.

Namespace:  Tortuga.Chain.DataSources
Assembly:  Tortuga.Chain.Core (in Tortuga.Chain.Core.dll)

Syntax


ISingleRowDbCommandBuilder<TObject> GetByKey<TObject, TKey>(
	TKey key
)
Function GetByKey(Of TObject, TKey) ( _
	key As TKey _
) As ISingleRowDbCommandBuilder(Of TObject)
generic<typename TObject, typename TKey>
ISingleRowDbCommandBuilder<TObject>^ GetByKey(
	TKey key
)

Type Parameters

TObject
The type of the object. Used to determine which table will be read.
TKey

Parameters

key
Type: TKey
The key.

Return Value

Remarks


This only works on tables that have a scalar primary key.