“System.Data.Entity.Internal.AppConfig"的类型初始值设定项引发异常。

  <connectionStrings>

    <add name="ConnectionStringName"

        providerName="System.Data.SqlClient" connectionString="Data Source=.;Initial Catalog=DataBaseName;Integrated Security=True;Pooling=False" />

  </connectionStrings>

必须写在

  <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=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

  </configSections>

之后 。


你可能感兴趣的:(System)