Click or drag to resize
SqlMapperExecute Method (IDbConnection, String, Object, IDbTransaction, NullableInt32, NullableCommandType)
Execute parameterized SQL

Namespace: Dapper
Assembly: VirtualRadar.Database (in VirtualRadar.Database.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static int Execute(
	this IDbConnection cnn,
	string sql,
	Object param = null,
	IDbTransaction transaction = null,
	Nullable<int> commandTimeout = null,
	Nullable<CommandType> commandType = null
)

Parameters

cnn
Type: System.DataIDbConnection
sql
Type: SystemString
param (Optional)
Type: SystemObject
transaction (Optional)
Type: System.DataIDbTransaction
commandTimeout (Optional)
Type: SystemNullableInt32
commandType (Optional)
Type: SystemNullableCommandType

Return Value

Type: Int32
Number of rows affected

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDbConnection. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also