InsertAndReturnId(T) Method (String, T, CacheSettings)

SimpleEssentials

IDbProvider..::..InsertAndReturnId<(Of <(<'T>)>)> Method (String, T, CacheSettings)

Inserts an object into a table and then return its ID.

Namespace:  SimpleEssentials.DataProvider
Assembly:  SimpleEssentials (in SimpleEssentials.dll)

Syntax


[ObsoleteAttribute]
int InsertAndReturnId<T>(
	string sql,
	T data,
	CacheSettings cacheSettings
)
<ObsoleteAttribute> _
Function InsertAndReturnId(Of T) ( _
	sql As String, _
	data As T, _
	cacheSettings As CacheSettings _
) As Integer
[ObsoleteAttribute]
generic<typename T>
int^ InsertAndReturnId(
	String^ sql, 
	T data, 
	CacheSettings^ cacheSettings
)

Type Parameters

T

Parameters

sql
Type: String
The SQL.
data
Type: T
The data.
cacheSettings
Type: SimpleEssentials.Cache..::..CacheSettings
The cache settings.

Return Value

ID of the newly inserted row