Jan 3, 2012 at 5:51 AM
Edited Jan 3, 2012 at 5:59 AM
What class does your CreateDatabaseCustom currently belong to?
You can't inherit and override the DatabaseFactory because it is a static class. Also, you can't create any extension methods because it's static.
One option would be to create a facade around the DatabaseFactory where your class would call the DatabaseFactory.Create method unless a connection string was passed as an argument in which case you would execute your CreateDatabaseCustom logic.
Perhaps if you elaborate more on your scenario we could make some other suggestions? E.g. is the runtime connection string determined once at startup and then doesn't change or does it change (potentially) for every call? etc.
Enterprise Library support engineer