Executing multiple stored procedures with Dapper.NET.
Does Dapper.NET support executing multiple stored procedures at the same time? I have several SPs each with a different set of parameters. I want to send one SQL Server call to execute all SPs. Each SP returns multiple records.
thank
+3
Bill
source
to share
1 answer
Yes:
using(var multi = conn.QueryMultiple(
@"exec foo @a, @b;
exec bar @a, @c", args))
{
var foos = multi.Read<Foo>().ToList();
var bars = multi.Read<Bar>().ToList();
}
(code from memory, apologies for any minor typos)
+4
Marc gravell
source
to share