public void BackupAndClearAll() { _database.Backup($"{Settings.TruckCachePath}_bak_{ DateTime.Now.ToString("YYMMdd")}"); File.Delete(Settings.TruckCachePath); _database.Backup($"{Settings.OrderCachePath}_bak_{DateTime.Now.ToString("YYMMdd")}"); File.Delete(Settings.OrderCachePath); _database.Backup($"{Settings.StopCachePath}_bak_{DateTime.Now.ToString("YYMMdd")}"); File.Delete(Settings.StopCachePath); _database.Backup($"{Settings.OrderDetailCachePath}_bak_{DateTime.Now.ToString("YYMMdd")}"); File.Delete(Settings.OrderDetailCachePath); }
public static void BackUpDataBase(string destinationPath) { using (SQLiteConnection connection = new SQLiteConnection(DataBase.mainDatabaseFile)) { connection.Backup(destinationPath, "main"); } }