Commit 3b53c0c5 authored by mgravell's avatar mgravell

fix a test that used System.Data.SqlClient.SqlCommand directly

parent 17a9c9ce
......@@ -622,14 +622,19 @@ public SO29596645_RuleTableValuedParameters(string parameterName)
public void AddParameters(IDbCommand command, SqlMapper.Identity identity)
{
Debug.WriteLine("> AddParameters");
var lazy = (System.Data.SqlClient.SqlCommand)command;
lazy.Parameters.AddWithValue("Id", 7);
var p = command.CreateParameter();
p.ParameterName = "Id";
p.Value = 7;
command.Parameters.Add(p);
var table = new DataTable
{
Columns = { { "Id", typeof(int) } },
Rows = { { 4 }, { 9 } }
};
lazy.Parameters.AddWithValue("Rules", table);
p = command.CreateParameter();
p.ParameterName = "Rules";
p.Value = table;
command.Parameters.Add(p);
Debug.WriteLine("< AddParameters");
}
}
......
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