Exemplo n.º 1
0
 public async Task UsingConnectionAsync(Func <ConnectionContext, Task> action)
 {
     using (var conn = CreateConnection())
     {
         await conn.OpenAsync().ConfigureAwait(false);
         await action(ContextProvider.GetConnectionContext(conn, QueryOptions, BulkOptions, ReadOptions)).ConfigureAwait(false);
     }
 }
Exemplo n.º 2
0
 public void UsingConnection(Action <ConnectionContext> action)
 {
     using (var conn = CreateConnection())
     {
         conn.Open();
         action(ContextProvider.GetConnectionContext(conn, QueryOptions, BulkOptions, ReadOptions));
     }
 }