Skip to content

Instantly share code, notes, and snippets.

@jonnii
Created September 19, 2012 13:38
Show Gist options
  • Save jonnii/3749728 to your computer and use it in GitHub Desktop.
Save jonnii/3749728 to your computer and use it in GitHub Desktop.
db api
var dataSource = new SqlServerDataSource
{
ConnectionString = "connection-string"
};
var procedure = new StoredProcedure("SomeStoredProcedureName");
procedure.AddInput("parameter", "value");
dataSource.Execute(procedure, t =>
{
Console.WriteLine(t.GetInt32(0));
Console.WriteLine(t.GetString(1));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment