开发者

Enterprise Library 5.0 and Connection management

Am working on a enterprise application where multiple clients will work on the system. Used three tier architecture and in database layer we are using enterprise library 5 for all the database 开发者_如何学Gooperation. I have declared a class level variable like this :-

SqlDatabase sqldtabase = 
    EnterpriseLibraryContainer.Current.GetInstance<SqlDatabase>("Beta");

and we are using sqldatabase variable for retrieving data from db and calling various Sp.

My query is how enterprise library does connection management and how it does connection pooling as well. Do we need to explicitly open or close connection or enterprise library take care of it.


If you're using ExecuteReader, for example, you'll need to explicitly close the connection.

You can change the pool size, for example set the max size in the web.config. The actual management is controlled by SQL Server.

Do you have some example code that you're not sure about?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜