Enterprise Library Singleton Instance RRS feed

  • Question

  • Hi,


    I am currently designing the data access logic for an Application and I am using the Enterprise Library.  I have a few questions regarding the best practices on this.

    1. Should I use one instance of the Database class created from DatabaseFactory.CreateDatabase in each DataAccess class or should should each DataAccess class contain its own instance of the Database class.  What is the advantage and disadvantage of each.
    2. Is there any situation in which I should close the connection explicitly or is this automatically handled through the Enterprise library.



    Wednesday, June 6, 2007 8:40 AM