PostgreSqlDataSourceBase..::..GetByKey<(Of <(<'TObject, TKey>)>)> Method (PostgreSqlObjectName, TKey)
Gets a record by its primary key.
Namespace:
Tortuga.Chain.PostgreSqlAssembly: Tortuga.Chain.PostgreSql (in Tortuga.Chain.PostgreSql.dll)
Syntax
[SuppressMessageAttribute] public SingleRowDbCommandBuilder<NpgsqlCommand, NpgsqlParameter, TObject> GetByKey<TObject, TKey>( PostgreSqlObjectName tableName, TKey key )
<SuppressMessageAttribute> _ Public Function GetByKey(Of TObject, TKey) ( _ tableName As PostgreSqlObjectName, _ key As TKey _ ) As SingleRowDbCommandBuilder(Of NpgsqlCommand, NpgsqlParameter, TObject)
[SuppressMessageAttribute] public: generic<typename TObject, typename TKey> SingleRowDbCommandBuilder<NpgsqlCommand^, NpgsqlParameter^, TObject>^ GetByKey( PostgreSqlObjectName^ tableName, TKey key )
Type Parameters
- TObject
- The type of the object. Used to determine which table will be read.
- TKey
Parameters
- tableName
- Type: Tortuga.Chain.PostgreSql..::..PostgreSqlObjectName
Name of the table.
- key
- Type: TKey
The key.