Belgrade-SqlClient icon indicating copy to clipboard operation
Belgrade-SqlClient copied to clipboard

Pass User-Defined Table Types as parameter to Stored Procedure

Open WJChai opened this issue 4 years ago • 1 comments

Hi, is it possible to pass User-Defined Table Types in await sqlCmd .Proc("SomeStoreProcedure") .Param("aUserDefinedTypeParam", aSqlParameterInstance)? Thanks

WJChai avatar Jun 17 '20 03:06 WJChai

I try to merge it with classic SqlCommand way of adding parameters and it works:- ` var command = new SqlCommand("EXEC SomeStoredProcedure @intParam=@intParam, @tblParam=@tblParam");

command.Parameters.Add(tblParamSqlParameterInstance);

await this._command.Sql(command) .Param("intParam", 3) `

Is this the recommended way?

WJChai avatar Jun 17 '20 04:06 WJChai