Commit 9226076f authored by Marc Gravell's avatar Marc Gravell

Merge pull request #170 from tuespetre/master

Fixed regression with sproc tests
parents 1a935bd7 9ff6cd17
...@@ -4397,16 +4397,22 @@ protected void AddParameters(IDbCommand command, SqlMapper.Identity identity) ...@@ -4397,16 +4397,22 @@ protected void AddParameters(IDbCommand command, SqlMapper.Identity identity)
// DynamicParameters until now. // DynamicParameters until now.
foreach (IDbDataParameter param in command.Parameters) foreach (IDbDataParameter param in command.Parameters)
{ {
parameters.Add(param.ParameterName, new ParamInfo // If someone makes a DynamicParameters with a template,
{ // then explicitly adds a parameter of a matching name,
AttachedParam = param, // it will already exist in 'parameters'.
CameFromTemplate = true, if (!parameters.ContainsKey(param.ParameterName))
DbType = param.DbType, {
Name = param.ParameterName, parameters.Add(param.ParameterName, new ParamInfo
ParameterDirection = param.Direction, {
Size = param.Size, AttachedParam = param,
Value = param.Value 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 // 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