0

I hant to be able to call DatabaseFactory.CreateDatabase(), i.e. with no parameter to indicate which connection string to pull from my config file. I only have one connection string in my config file. The only help I have found on the internet is instructions to indicate the default connection string using the Enterprise Library Configuration tool (by right-clicking on my config file in Visual Studio). But from there, I see no way to "select" a connection string or mark it to be the default.

strongopinions
  • 3,917
  • 3
  • 25
  • 28

1 Answers1

1

YOu should define the dataConfiguration section in your config

<configuration>
<configSections>
<section name="dataConfiguration" ...

And then set the value

<dataConfiguration defaultDatabase="ConnectionStringName" />
keithwarren7
  • 14,094
  • 8
  • 53
  • 74