EntityFramework 找不到方法:“Void System.Data.Entity.DbModelBuilder.RegisterEntityType

问题原因,EF当前版本没有该方法,将EF版本升级即可。

1、packages.config

 

 <package id="EntityFramework" version="6.1.3" targetFramework="net40" />

2、app.config

<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.1.3.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>

posted @ 2017-09-14 16:54  akiing  阅读(685)  评论(0编辑  收藏  举报