//Delete all contactlist or delete Contacts table public void DeleteAllContact() { using (SQLite.Net.SQLiteConnection conn = new SQLite.Net.SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), App.DB_PATH)) { conn.DropTable <Contacts>(); conn.CreateTable <Contacts>(); conn.Dispose(); conn.Close(); } }
private static void ExcluirTodasGastoCnpj() { using (SQLite.Net.SQLiteConnection conexao = new SQLite.Net.SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), App.DB_PATH)) { conexao.DropTable <GastoCnpj>(); conexao.CreateTable <GastoCnpj>(); conexao.Dispose(); conexao.Close(); } }
private static void ExcluirTodosOsDeputados() { using (SQLite.Net.SQLiteConnection conexao = new SQLite.Net.SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), App.DB_PATH)) { for (int i = 0; i <= 10; i++) { try { conexao.DropTable <Deputado>(); conexao.CreateTable <Deputado>(); conexao.Dispose(); conexao.Close(); break; } catch { Task.Delay(5000); break; } } } }
// Close database connection private void closeDBconnection() { conn.Commit(); conn.Dispose(); conn.Close(); }
//fecha conexao SqlLite public void Dispose() { _conexao.Dispose(); }
public void Dispose() { _connection.Dispose(); }