This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see
Cake.SqlServer.
Summary
Extracts a dacpac file to a database package.
Syntax
public static void ExtractDacpacFile(this ICakeContext context, string connectionString, string targetDatabaseName, ExtractDacpacSettings settings)
Examples
#addin "nuget:?package=Cake.SqlServer"
Task("Extract-Dacpac")
.Does(() =>{
var connString = @"data source=(localdb)\MSSqlLocalDb";
var dbName = "ForDacpac";
CreateDatabase(connString, dbName);
var settings = new ExtractDacpacSettings("MyAppName", "2.0.0.0") {
OutputFile = new FilePath(@".\TestData\Nsaga.dacpac")
};
ExtractDacpacFile(connString, dbName, settings);
});
});
Attributes
Type |
Description |
CakeMethodAliasAttribute |
|
Parameters
Name |
Type |
Description |
context |
ICakeContext |
The Cake context. |
connectionString |
string |
The connection string. |
targetDatabaseName |
string |
Name of the database you'd like to extract a package from |
settings |
ExtractDacpacSettings |
Custom setting for the extract operation. |
Return Value