Skip to content
Mike Mogosanu edited this page Apr 19, 2016 · 4 revisions

Obsolete

Usage

var result=db.ExecuteStoredProcedure("SProcName",new{ Id=2, Name="A Name", _Data=0})
Console.WriteLine(result.ReturnValue);
Console.WriteLine(result.OutputValues["Data"]);

You pass parameters to the sproc using an anonymous object. By convention, any property of the param object that starts with an underscore is considered to be an output parameter. The rest are input parameters. The result of the execution contains the return value of the sproc and the output values (if there are any)