FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

CommandType by mattewre · Pull Request #601 · sqlkata/querybuilder · GitHub

CommandType - #601

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

CommandType#601
mattewre wants to merge 1 commit into
sqlkata:masterfrom
mattewre:commandType

Conversation

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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL