dotnet / ef6

This is the codebase for Entity Framework 6 (previously maintained at https://entityframework.codeplex.com). Entity Framework Core is maintained at https://github.com/dotnet/efcore.

Home Page:https://docs.microsoft.com/ef/ef6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No app.config override for Microsoft.Data.SqlClient?

EdLichtman opened this issue · comments

I was having some troubles with integrating Microsoft.Data.SqlClient into one of my projects when I noticed something in my app.config that isn't in my other app.configs:

<configuration>
  <configSections>
  <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework"
      type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
      requirePermission="false"/>
  </configSections>

  <!-- ....more configuration... -->
  <entityFramework>
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
    </providers>
  </entityFramework>
</configuration>

I removed that section and my tests started working again.

Is there a way to incorporate that app.config settings in place of the method used here: #2250?

Also, do you have an FAQ on how to transition from System.Data.SqlClient to Microsoft.Data.SqlClient?

Oh I see! I was looking for Microsoft.Data.Entity.SqlServer.SqlProviderServices instead of System....MicrosoftSqlProviderServices.

Thanks!