/** * Clear Database, delete all rows in each trable **/ public static void ClearDB() { DB_BLOCKS.GetCollection <Block>(TBL_BLOCKS).DeleteAll(); DB_TXNS.GetCollection <Transaction>(TBL_TRANSACTIONS).DeleteAll(); DB_ACCOUNTS.GetCollection <Account>(TBL_ACCOUNTS).DeleteAll(); DB_OTHERS.GetCollection <Block>(TBL_STAKES).DeleteAll(); DB_OTHERS.GetCollection <Block>(TBL_PEERS).DeleteAll(); }
/** * Close database when app closed **/ public static void CloseDB() { DB_BLOCKS.Dispose(); }