Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mikependon/ca700f4ae16c6541c71363c8e75d9ff3 to your computer and use it in GitHub Desktop.
Save mikependon/ca700f4ae16c6541c71363c8e75d9ff3 to your computer and use it in GitHub Desktop.
IDbConnection (ExecuteQuery<Orders> via StoredProcedures)
using (var connection = new SqlConnection(connectionString))
{
var orders = connection.ExecuteQuery<Order>("[dbo].[sp_get_customer_orders]",
new { CustomerId = 10045 },
commandType: CommandType.StoredProcedure);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment