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 using statement Which will settle for me for SqlConnection .

  (var conn = SqlConnection ()) {// SQL   after calling   

this Will be closed) after calling } , as applicable:

  Protected Virtual Zero Disposing (Bull Displacement) {Close () ; }    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -