Commit 9ff6cd17 authored by Derek Gray's avatar Derek Gray

Fixed regression with sproc tests

parent 1a935bd7
......@@ -4397,16 +4397,22 @@ protected void AddParameters(IDbCommand command, SqlMapper.Identity identity)
// DynamicParameters until now.
foreach (IDbDataParameter param in command.Parameters)
{
parameters.Add(param.ParameterName, new ParamInfo
{
AttachedParam = param,
CameFromTemplate = true,
DbType = param.DbType,
Name = param.ParameterName,
ParameterDirection = param.Direction,
Size = param.Size,
Value = param.Value
});
// If someone makes a DynamicParameters with a template,
// then explicitly adds a parameter of a matching name,
// it will already exist in 'parameters'.
if (!parameters.ContainsKey(param.ParameterName))
{
parameters.Add(param.ParameterName, new ParamInfo
{
AttachedParam = param,
CameFromTemplate = true,
DbType = param.DbType,
Name = param.ParameterName,
ParameterDirection = param.Direction,
Size = param.Size,
Value = param.Value
});
}
}
// Now that the parameters are added to the command, let's place our output callbacks
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment