Esempio n. 1
0
        public void Restore(string databaseName)
        {
            string bakPath = $"{localPath}\\{temporaryDatabase}.bak";
            string mdfPath = $"{localPath}\\{databaseName}.mdf";
            string ldfPath = $"{localPath}\\{databaseName}.ldf";

            SqlOperations.Restore(options.Destination.Server, bakPath, mdfPath, ldfPath, databaseName, temporaryDatabase);
        }
Esempio n. 2
0
        public void Backup()
        {
            string path = $"{localPath}\\{temporaryDatabase}.bak";

            SqlOperations.Backup(path, options.Destination.Server, options.Destination.Database);
        }
Esempio n. 3
0
 public void Rename()
 {
     SqlOperations.DropDatabase(options.Destination.Server, options.Destination.Database);
     SqlOperations.RenameDatabase(options.Destination.Server, temporaryDatabase, options.Destination.Database);
 }