I have to call Stored Procedure in which parameters are char
and VarBinary(MAX)
. I need to call this stored procedure from C# code using Dapper. But I am not able to find any parameter supported by dapper.
SP:
ALTER PROCEDURE [dbo].[uspTest]
, @Param1 CHAR(1)
, @Param2 VARBINARY(MAX)=null
C#:
DynamicParameters parameter = new DynamicParameters();
parameter.Add("@Param1", email.SenderType, DbType.char, ParameterDirection.Input);
parameter.Add("@Param2", email.AttachedFileStream, DbType.varbinary, ParameterDirection.Input);
Compilation Error:
DBType does not contain definition for char and varbinary