将提供的包部署到数据库时:
DacServices service = new DacServices(connectionString);
DacPackage dacpac = DacPackage.Load(dacpacPath);
DacDeployOptions ddo = new DacDeployOptions();
ddo.BlockOnPossibleDataLoss = false;
service.Deploy(dacpac, dbName, true, ddo);
你怎么能通过取消令牌取消它,这会回滚整个部署操作吗?
所以,我可以创建一个取消令牌并将其传递给 Deploy 方法,但是,之后如何取消它呢?而且,它会回滚整个操作吗?
CancellationToken token = new CancellationToken();
service.Deploy(dacpac, dbName, true, ddo, token);