title: How to restore an Azure SQL Database to point-in-time using Azure management libraries for .NET
body: <p>Below are for creating a database using Azure management libraries, and I would like to know how to restore an existing database to point-in-time on Azure.</p>
  
  <pre><code>// Crate Authenticate
  var credentials = SdkContext.AzureCredentialsFactory.FromServicePrincipal("{clientId}", "{client-secret}", "{teantId}", AzureEnvironment.AzureGlobalCloud);
  
  // Connect Azure
  var azure = Azure
              .Configure()
              .WithLogLevel(HttpLoggingDelegatingHandler.Level.Basic)
              .Authenticate(credentials)
              .WithDefaultSubscription();
  
  // Create TestDB
  var sqlServer = azure.SqlServers.GetById("{sql-server-Id}");
  sqlServer.Databases.Define("TestDB").Create();
  
  // Point-in-time restore ???
  </code></pre>