public async Task <IActionResult> Restore(string path) { var apiMsg = await ApiMessage.Wrap(async() => { string constring = config["dbConn"]; DbBackupTool dbBackupTool = new DbBackupTool(); dbBackupTool.RestoreDB(constring, path); }); return(Json(apiMsg)); }
public async Task <IActionResult> SaveBackup() { var apiMsg = await ApiMessage.Wrap(async() => { string constring = config["dbConn"]; string file = GenerateBackupFileName(); DbBackupTool dbBackupTool = new DbBackupTool(); dbBackupTool.CreateBackup(constring, file); }); return(Json(apiMsg)); }