Closing SQLiteConnection (SQLiteConnectionWithLock) Closing SQLiteConnection (SQLiteConnectionWithLock) sqlite sqlite

Closing SQLiteConnection (SQLiteConnectionWithLock)


Personally I wrap my db actions into a using statement which will dispose of the SqlConnection for me.

using (var conn = SqlConnection()){    //SQL stuff here}

This will make the Close() call after the last }, sqlite-net implements that way:

protected virtual void Dispose(bool disposing){    Close();}