I have tried to search online code in VB.net for importing/restoring bacpac on my local SQL server instance but unable to find out. Can anyone help me with this problem?
Asked
Active
Viewed 101 times
1 Answers
0
You can try using dacpac NuGet package. This will help you to solve the error.
Please refer following code.
var services = new DacServices(ConnectionString);
using (BacPackage bacpac = BacPackage.Load(bacpacfileStream)) { services.ImportBacpac(bacpac, DatabaseName, new DacAzureDatabaseSpecification { MaximumSize = 500, Edition = DacAzureEdition.Standard, ServiceObjective = "S4" }); }

Akash Samal
- 87
- 1
- 9