Change ParamInfo value after adding to DynamicParameters?

I call the stored proc in a loop foreachand would like to change the value of one of the parameters at each iteration. Currently, there seems to be no way to access the parameters after they are added to DynamicParameters, although by reading the source code I can see that DynamicParameters saves the internal dictionary. Any reason why this is not publicly available or is there another way to get the value of ParamInfos to change the values?

Update

What I have:

foreach ( var fooID in fooIDs )
{
    var dynamicParameters = new DynamicParameters();
    dynamicParameters.Add( ParameterNames.BarID, barID );
    dynamicParameters.Add( ParameterNames.FooID, fooID);

    connection.Execute( ProcNames.MyProc, dynamicParameters, commandType:CommandType.StoredProcedure );
}
+3
source share
1 answer

DynamicParameters , , ParamInfo , / /. , , .

IDynamicParameters, , , . DynamicParameters .

+2

All Articles