Commit 2b47b1a8 authored by Sam Saffron's avatar Sam Saffron

added proc support

parent 8f561c93
This diff is collapsed.
...@@ -507,6 +507,30 @@ public void TestSupportForParamDictionary() ...@@ -507,6 +507,30 @@ public void TestSupportForParamDictionary()
p.Get<int>("@age").IsEqualTo(11); p.Get<int>("@age").IsEqualTo(11);
} }
public void TestProcSupport()
{
var p = new DynamicParameters();
p.Add("@a", 11);
p.Add("@b", dbType: DbType.Int32, direction: ParameterDirection.Output);
p.Add("@c", dbType: DbType.Int32, direction: ParameterDirection.ReturnValue);
connection.Execute(@"create proc #TestProc
@a int,
@b int output
as
begin
set @b = 999
select 1111
return @a
end");
connection.Query<int>("#TestProc", p, commandType: CommandType.StoredProcedure).First().IsEqualTo(1111);
p.Get<int>("@c").IsEqualTo(11);
p.Get<int>("@b").IsEqualTo(999);
}
/* TODO: /* TODO:
* *
public void TestMagicParam() public void TestMagicParam()
......
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