c# - Closing SQLiteConnection (SQLiteConnectionWithLock) -
I am using in my application.
What is the best practice to manage the connection using a library of lifecycle? I can not find any examples where the SQLiteConnection.Close () method is used. But common requests are to close the connection after each request or bulk of the request. So should I make a connection to an application and it should never be settled? Personally I wrap my DB works using the this
using statement Which will settle for me for
SqlConnection .
(var conn = SqlConnection ()) {// SQL
Will be closed) after calling
} , as applicable:
Protected Virtual Zero Disposing (Bull Displacement) {Close () ; }
Comments
Post a Comment