Created
September 19, 2012 13:38
-
-
Save jonnii/3749728 to your computer and use it in GitHub Desktop.
db api
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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