/// <summary>
 /// Imports a bacpac to Azure SQL Database. To determine the status of
 /// the operation call GetImportExportOperationStatus.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Sql.LegacySdk.IImportExportOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the Resource Group to which the Azure SQL
 /// Server belongs.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Server on which the database is
 /// hosted.
 /// </param>
 /// <param name='parameters'>
 /// Required. The required parameters for importing to a database.
 /// </param>
 /// <returns>
 /// Response Azure Sql Import/Export operations.
 /// </returns>
 public static Task <ImportExportResponse> ImportAsync(this IImportExportOperations operations, string resourceGroupName, string serverName, ImportRequestParameters parameters)
 {
     return(operations.ImportAsync(resourceGroupName, serverName, parameters, CancellationToken.None));
 }
示例#2
0
 /// <summary>
 /// Imports a bacpac into a new database.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='parameters'>
 /// The database import request parameters.
 /// </param>
 public static ImportExportOperationResult Import(this IImportExportOperations operations, string resourceGroupName, string serverName, string databaseName, ImportExistingDatabaseDefinition parameters)
 {
     return(operations.ImportAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult());
 }