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

SimpleEssentials

DbDataProvider..::..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


public int InsertAndReturnId<T>(
	string sql,
	T data,
	CacheSettings cacheSettings
)
Public Function InsertAndReturnId(Of T) ( _
	sql As String, _
	data As T, _
	cacheSettings As CacheSettings _
) As Integer
public:
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