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
Creates a bacpac file for easy database backuping.
Syntax
public static void CreateBacpacFile(this ICakeContext context, string connectionString, string databaseName, FilePath resultingFilePath)
Examples
#addin "nuget:?package=Cake.SqlServer"
Task("Create-Bacpac")
.Does(() =>{
var connString = @"data source=(localdb)\MSSqlLocalDb";
var dbName = "ForBacpac";
CreateDatabase(connString, dbName);
CreateBacpacFile(connString, dbName, new FilePath(@".\ForBacpac.bacpac"));
});
});
Attributes
Type |
Description |
CakeMethodAliasAttribute |
|
Parameters
Name |
Type |
Description |
context |
ICakeContext |
The Cake context. |
connectionString |
string |
The connection string. You may want to connect to master database for this operation. |
databaseName |
string |
Name of the database you'd like to create a bacpac from |
resultingFilePath |
FilePath |
Full path where you'd like to store resulting bacpac |
Return Value