Esempio n. 1
0
 public async Task DestroyAllAsync(CancellationToken cancellationToken)
 {
     using (var context = await _options.GetContextAsync(cancellationToken).ConfigureAwait(false))
     {
         var sql = _options.GetDropTableSql();
         using (var cmd = context.CreateCommand(sql))
         {
             await cmd.ExecuteNonQueryAsync(cancellationToken).ConfigureAwait(false);
         }
     }
 }
Esempio n. 2
0
        public async Task DestroyAllAsync(CancellationToken cancellationToken)
        {
            using (var conn = Connect())
            {
                await conn.OpenAsync(cancellationToken).ConfigureAwait(false);

                var sql = _options.GetDropTableSql();
                using (var cmd = CreateCommand(sql, conn))
                {
                    await cmd.ExecuteNonQueryAsync(cancellationToken).ConfigureAwait(false);
                }
            }
        }