c# - Dispose the connection or Close the connection -


Which of the following two ways is better performance?

  (var db_Connection_s = new DBC connection ()) {// todo: conversation with database connection}   

or simply:

  DB_Connection_s.Close ();   

Finally.

What makes the concept of pooling unusable? Because if I settle the connection with each use, then I will have to open a new connection every time (and there will be no connection to the pool).

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -