.dacpac
是否可以从现有 SSDT 项目创建“新”文件?我希望能够在每次自动端到端测试之前重新创建数据库(拆卸 + 设置):
const string dacPacFileName = @"D:\Bla.dacpac";
var connectionString = ConfigurationManager.ConnectionStrings["BlaConnectionString"].ConnectionString;
var dacPackage = DacPackage.Load(dacPacFileName);
var dacServices = new DacServices(connectionString);
var dacOptions = new DacDeployOptions();
dacOptions.CreateNewDatabase = true;
dacServices.Deploy(dacPackage, "Bla", true, dacOptions);