Guys, I am going to use Enterprise Library (4.1) and especially DAAB. Here is I have questions:
What is the best approach and why:
Every time when I need to run a DbCommand I create Database instance using DatabaseFactory.CreateDatabase();
I have a base class with instanced Database (using the same CreateDatabase() static method) and something like public property which returns the instanced database.
How it is “heavy” or fast/slow to create an instance of Database class? What if I do it every time when a DbCommand is needed?
Thank you.