Tortuga.Chain Namespace
Tortuga.Chain.Metadata Namespace

MySqlDataSourceBase..::..GetByKeyList<(Of <(<'TKey>)>)> Method (MySqlObjectName, String, IEnumerable<(Of <(<'TKey>)>)>)

Gets a set of records by an unique key.

Namespace:  Tortuga.Chain.MySql
Assembly:  Tortuga.Chain.MySql (in Tortuga.Chain.MySql.dll)

Syntax


[SuppressMessageAttribute]
public MultipleRowDbCommandBuilder<MySqlCommand, MySqlParameter> GetByKeyList<TKey>(
	MySqlObjectName tableName,
	string keyColumn,
	IEnumerable<TKey> keys
)
<SuppressMessageAttribute> _
Public Function GetByKeyList(Of TKey) ( _
	tableName As MySqlObjectName, _
	keyColumn As String, _
	keys As IEnumerable(Of TKey) _
) As MultipleRowDbCommandBuilder(Of MySqlCommand, MySqlParameter)
[SuppressMessageAttribute]
public:
generic<typename TKey>
MultipleRowDbCommandBuilder<MySqlCommand^, MySqlParameter^>^ GetByKeyList(
	MySqlObjectName^ tableName, 
	String^ keyColumn, 
	IEnumerable<TKey>^ keys
)

Type Parameters

TKey
The type of the keys.

Parameters

tableName
Type: Tortuga.Chain.MySql..::..MySqlObjectName
Name of the table.
keyColumn
Type: String
Name of the key column. This should be a primary or unique key, but that's not enforced.
keys
Type: IEnumerable<(Of <(<'TKey>)>)>
The keys.

Return Value

MultipleRowDbCommandBuilder<AbstractCommand, AbstractParameter>.

Exceptions


ExceptionCondition
Tortuga.Chain..::..MappingExceptionCannot find a column named {keyColumn} on table {tableName}.

Remarks


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