title: How can I make Quartz.NET AdoJobStore work with Entity Framework?
body: <ul>
  <li>.NET 4.51</li>
  <li>Entity Framework 6.x</li>
  </ul>
  
  <p>I have a separate project / assembly that wraps the core Quartz.NET functionality. I want to programatically configure Quartz.NET to persist information to SQL Server. As this is a separate assembly the App.config is very minimal and I want to pass in a connection string. Here is the <strong>complete</strong> App.config:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;configuration&gt;
        &lt;configSections&gt;
          &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
        &lt;/configSections&gt;
        &lt;entityFramework&gt;
          &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /&gt;
          &lt;providers&gt;
            &lt;provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /&gt;
          &lt;/providers&gt;
        &lt;/entityFramework&gt;
      &lt;/configuration&gt;
  </code></pre>
  
  <p>and here is the code I am using to configure Quartz.NET:</p>
  
  <pre><code>properties["quartz.scheduler.instanceName"] = "My Scheduler";
  properties["quartz.scheduler.instanceId"] = "MySchedulerId";
  properties["quartz.jobStore.type"] = "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz";
  properties["quartz.jobStore.useProperties"] = "true";
  properties["quartz.jobStore.dataSource"] = "default";
  properties["quartz.dataSource.default.connectionString"] = aConnectionString;
  properties["quartz.dataSource.default.provider"] = "System.Data.SqlClient";
  properties["quartz.jobStore.tablePrefix"] = "QRTZ_";
  </code></pre>
  
  <p>The value for aConnectionString is:</p>
  
  <p><strong>TESTING</strong></p>
  
  <pre><code>"Data Source=.\\SQLEXPRESS;Initial Catalog=xxxxx;Integrated Security=True;MultipleActiveResultSets=True"
  </code></pre>
  
  <p><strong>PRODUCTION</strong></p>
  
  <pre><code>server=sql.server.com;User Id=xxxx;password=xxx;Persist Security Info=True;database=xxxx" providerName="System.Data.SqlClient
  </code></pre>
  
  <p>However when I attempt to call GetScheduler() I receive the following error message:</p>
  
  <pre><code>Could not Initialize DataSource: default
  </code></pre>
  
  <p>and the inner exception has:</p>
  
  <pre><code>{"There is no metadata information for provider 'System.Data.SqlClient'\r\nParameter name: providerName"}
  </code></pre>
  
  <p>So what am I missing here? What do I have to change to make this work?</p>