/// <summary>
 /// Starts a SQL Server database copy.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IDatabaseCopyOperations.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the SQL Server where the source database
 /// resides
 /// </param>
 /// <param name='databaseName'>
 /// Required. The name of the source database
 /// </param>
 /// <param name='parameters'>
 /// Required. Additional parameters for the create database copy
 /// operation
 /// </param>
 /// <returns>
 /// Response to the create request.
 /// </returns>
 public static DatabaseCopyCreateResponse Create(this IDatabaseCopyOperations operations, string serverName, string databaseName, DatabaseCopyCreateParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IDatabaseCopyOperations)s).CreateAsync(serverName, databaseName, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// The Create Database Copy operation starts a database copy.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IDatabaseCopyOperations.
 /// </param>
 /// <param name='serverName'>
 /// The name of the SQL Server where the source database resides
 /// </param>
 /// <param name='databaseName'>
 /// The name of the source database
 /// </param>
 /// <param name='parameters'>
 /// Additional parameters for the create database copy operation
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static DatabaseCopyResponse Create(this IDatabaseCopyOperations operations, string serverName, string databaseName, DatabaseCopyCreateParameters parameters)
 {
     try
     {
         return operations.CreateAsync(serverName, databaseName, parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// Starts a SQL Server database copy.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IDatabaseCopyOperations.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the SQL Server where the source database
 /// resides
 /// </param>
 /// <param name='databaseName'>
 /// Required. The name of the source database
 /// </param>
 /// <param name='parameters'>
 /// Required. Additional parameters for the create database copy
 /// operation
 /// </param>
 /// <returns>
 /// Response to the create request.
 /// </returns>
 public static Task<DatabaseCopyCreateResponse> CreateAsync(this IDatabaseCopyOperations operations, string serverName, string databaseName, DatabaseCopyCreateParameters parameters)
 {
     return operations.CreateAsync(serverName, databaseName, parameters, CancellationToken.None);
 }