1
votes

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 operation. 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.

1

1 Answers

0
votes

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?