Skip to content

CommandType - #601

Open
mattewre wants to merge 1 commit into
sqlkata:masterfrom
mattewre:commandType
Open

mattewre wants to merge 1 commit into
sqlkata:masterfrom
mattewre:commandType

Conversation

@mattewre

@mattewre mattewre commented Sep 8, 2022

Copy link
Copy Markdown

QueryFactory Select and Statement accept optional "commandType" supported by Dapper. Useful for Stored Procedure.

Example

var parameters = new DynamicParameters();
parameters.Add("@param1", 2);
parameters.Add("@param1out", dbType: DbType.Int32, direction: ParameterDirection.Output);

var result = db.Select("SP_TEST", parameters, commandType: CommandType.StoredProcedure);
var param1out = parameters.Get<int>("@param1out");

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants