.net connection pooling

后端 未结 5 1585
生来不讨喜
生来不讨喜 2020-12-01 14:26

I don\'t get what is the syntax difference between regular connection and connection pool.

When I\'m using the using key such as:

using          


        
5条回答
  •  日久生厌
    2020-12-01 15:08

    as far as i know,

    connection pooling is managed by ado.net client, since making connections to db is costly operation. ado.net makes pool of connections and whenever you need a connection it tries to give it from pool. even if you say to client code to close connection, ado.net hold that connection for later use. you dont manage the pooling

    connection pool is told in web.config file of application. when you use using statements , you tell that object should be disposed end of using.

提交回复
热议问题