所以我在这个问题上苦苦挣扎了 4 个多小时,我不知道再去哪里看。我为绝对初学者遵循本教程ADO.NET Entity Framework
- [参见教程][1] [1]:http: //msdn.microsoft.com/en-us/data/jj193542
我正在使用Microsoft SQL Server 2012
并且我正在使用这个App.Config
文件我的项目 :
<?xml version="1.0" encoding="utf-8"?>
<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=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">
<parameters>
<parameter value="Data Source=sqlserver2012; Integrated Security=True; MultipleActiveResultSets=True" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
</configuration>
但是我不断收到错误,当我使用此代码时,错误是:**An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string.**
我完全是新手,ADO.NET Entity Framework
但正如我所见,问题可能出在defaultConnectionFactory
配置中。但无论如何,我不知道如何继续以及如何解决这个问题。