A
Abhishek Tripathi
Hi,
I am using a code similar to
Database db = DatabaseFactory.CreateDatabase("MyDB")
in every function of my DAL that interacts directly to database. But
recently I have started getting connection pool errors.
I think, it is because of incorrect usage pattern of Database Object of
DAAB. I want to know that what should be the best approach to it. Shall
I declare it as a static object in class and then use it across the DAL
functions ? My concern is that if during an operation DB object is
locked, then other thread pools would not be able to perform any
database activity. My above assumption could be incorrect, but what
should be the best approach(es) for using EntLib from performance pov.
I am using a code similar to
Database db = DatabaseFactory.CreateDatabase("MyDB")
in every function of my DAL that interacts directly to database. But
recently I have started getting connection pool errors.
I think, it is because of incorrect usage pattern of Database Object of
DAAB. I want to know that what should be the best approach to it. Shall
I declare it as a static object in class and then use it across the DAL
functions ? My concern is that if during an operation DB object is
locked, then other thread pools would not be able to perform any
database activity. My above assumption could be incorrect, but what
should be the best approach(es) for using EntLib from performance pov.