1 <configSections> 2 <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> 3 <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> 4 <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> 5 </configSections> 6 <connectionStrings> 7 <add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)v11.0;Initial Catalog=aspnet-Happy.Shopping-20131211212310;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnet-Happy.Shopping-20131211212310.mdf" /> 8 <add name="NavigationUnitOfWork" connectionString="Data Source=(LocalDB)v11.0;AttachDbFilename=E:CodingHappyShoppingHappy.ShoppingHappy.ShoppingApp_DataShopping.mdf;Integrated Security=True" providerName="System.Data.SqlClient" /> 9 </connectionStrings>
注意:确定配置文件的版本号和项目引用的版本号匹配。