Tutorial by Examples

When the temp table is created by itself, it will remain while the connection is open. // Widget has WidgetId, Name, and Quantity properties public async Task PurchaseWidgets(IEnumerable<Widget> widgets) { using(var conn = new SqlConnection("{connection string}")) { ...
The point about temporary tables is that they're limited to the scope of the connection. Dapper will automatically open and close a connection if it's not already opened. That means that any temp table will be lost directly after creating it, if the connection passed to Dapper has not been opened. ...

Page 1 of 1