Beispiel #1
0
        public static async Task DropDatabaseAsync(string connectionString, CancellationToken cancellationToken = default)
        {
            var options = new ConnectionString(connectionString);

            options.Validate();

            try
            {
                var db = new FbConnectionInternal(options);
                try
                {
                    await db.DropDatabaseAsync(cancellationToken).ConfigureAwait(false);
                }
                finally
                {
                    await db.DisconnectAsync(cancellationToken).ConfigureAwait(false);
                }
            }
            catch (IscException ex)
            {
                throw FbException.Create(ex);
            }
        }