I have a bacpac file and I need to import bacpac to a dataset type variable.
I have checked QL Azure BACPAC extraction, however I do not know how to use ImportBacpac
command from DacServices
:
SqlConnectionStringBuilder csb = new SqlConnectionStringBuilder();
//csb.DataSource = "servername";
//csb.Password = "whatever";
//csb.UserID = "whatever";
DacServices ds = new DacServices(csb.ConnectionString);
ds.ImportBacpac()
There is no example in MSDN website for ImportBacpac DacServices.ImportBacpac Method
Then I discover another post How to import Azure SQL backup (.bacpac) to LocalDB using Visual Studio? The method in that post uses a command line involving SqlPackage.exe
How do I import/read that bacpac to Dataset using that command line method above in C#? Or have I missed something?
Thank you.