I have a utilities wrapper over the existing Enterprise Library's Data access application block. The wrapper is a bit old, how-ever, in the older implementation, we had a static constructor which would call the Database.CreateDatabase(), which would take the key from web.config file. All this was working fine until, there was a requirement where my application had to talk to 2 different database(s) depending on the pages that were being developed.
Herez when the utilities wrapper fell on its face..and real hard. So, I am trying to re-do this wrapper...or try and fix it.
Now, I have found means/ways to find a work-around this issue, but am still debating between two approaches.
1. Keep it static.
2. Create the object during application_beginrequest and destroy it during end-request.
Anyone has any comments on the performance issues and the load on either approaches ... and any suggestions on whats better over what.
Thanks,
Sashidhar