使用EF flument API  修改映射数据库字段的自增长

modelBuilder.Entity<Invoice>().Property(p => p.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

报错Method not found: 'System.Data.Entity.ModelConfiguration.Configuration.XXX

卸载所有项目中引用的EntityFramework

重新使用Nuget安装EntityFramework

解决此问题。

原文链接 https://www.devexpress.com/Support/Center/Question/Details/T619780/scaffolding-wizard-error-when-using-fluent-api-syntax-hasindex

Method not found: 'System.Data.Entity.ModelConfiguration.Configuration.XXX的更多相关文章

  1. 【EF框架异常】System.MissingMethodException:“找不到方法:“System.Data.Entity.ModelConfiguration.Configuration.PrimitivePropertyConfiguration

    最近调试EF的时候遇到下面这个问题 System.MissingMethodException:“找不到方法:“System.Data.Entity.ModelConfiguration.Config ...

  2. Method 'ExecuteAsync' in type 'System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy' does not have an implementation

    一.错误信息 Entity Framework 6.0数据迁移:Add-Migration XXXX 命令发生错误 System.Reflection.TargetInvocationExceptio ...

  3. VS EF Error: Configuration Error extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider"

    错误截图: Configuration Error :<add extension=".edmx" type="System.Data.Entity.Design. ...

  4. System.Security.SecurityException The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception

    [15/08/19 00:03:10] [DataManager-7292-ERROR] System.Reflection.TargetInvocationException: Exception ...

  5. 序列化类型 System.Data.Entity.DynamicProxies 的对象时检测到循环引用

    学习 EF Code First+MVC 时遇到了在请求JsonResult时出现 序列化类型 System.Data.Entity.DynamicProxies 的对象时检测到循环引用 的异常,原因 ...

  6. ef 对象无法序列化的问题(System.Data.Entity.DynamicProxies)

    错误提示: System.InvalidOperationException: 生成 XML 文档时出错. ---> System.InvalidOperationException: 不应是类 ...

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

    <connectionStrings> <add name="ConnectionStringName" providerName="System.Da ...

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

    在学习EF code First的小案例的时候,遇见了这个异常 <configSections> <!-- For more information on Entity Framew ...

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

    <configSections> <!-- For more information on Entity Framework configuration, visit http:// ...

随机推荐

  1. DB2 OLAP函数的使用

    说起 DB2 在线分析处理,可以用很好很强大来形容.这项功能特别适用于各种统计查询,这些查询用通常的SQL很难实现,或者根本就无发实现.首先,我们从一个简单的例子开始,来一步一步揭开它神秘的面纱,请看 ...

  2. 一个简单的NodeJs静态页面的web服务器

    主要功能 1 显示www文件夹下静态html或文本类型的文件. 2 缺省访问文件功能. 通过config.js的defaultfile属性设置 3 如果文件夹下没有缺省文件,显示文件夹下文件列表 4 ...

  3. python之Flask框架

    一.简单的Flask框架 1)flask简介 Flask 是一个 web 框架.也就是说 Flask 为你提供工具,库和技术来允许你构建一个 web 应用程序. 这个 wdb 应用程序可以使一些 we ...

  4. Python开课复习-10/10

    1. 什么时匿名函数def 定义 的是有名函数:特点是可以通过名字重复调用 def func(): #func = 函数的内存地址 pass匿名函数就是没有名字的函数:特点是只能在定义时使用一次 2. ...

  5. java.io.IOException: java.sql.SQLException: ORA-01502: index 'BTO.PK_xxxxx' or partition of such index is in unusable state

    最近由于数据库的全备出问题了,所以一直在观察. 刚好发现很多不需要的数据,就删了几百个G的数据吧. 今天突然就报这个问题. java.io.IOException: java.sql.SQLExcep ...

  6. fastq-to-fasta转换及fasta拆分、合并

    格式转换: use awk :awk 'BEGIN{P=1}{if(P==1||P==2){gsub(/^[@]/,">");print}; if(P==4)P=0; P++ ...

  7. (10)The secret to great opportunities? The person you haven't met yet

    https://www.ted.com/talks/tanya_menon_the_secret_to_great_opportunities_the_person_you_haven_t_met_y ...

  8. 先加载js 后载控件

    可以使用如下 $(document).on('click','.classname',function(){});

  9. 使用hibernate从一方获取多方信息时报错:org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role

    引起原因:hibernate加载关联对象的方式有懒加载方式和立即加载方式. 如果在多对一的配置中没有指定加载方式,而一对多的配置中指定了懒加载方式,因此在获取一方是可获取到值,而获取多方时sessio ...

  10. 吓死baobao了

    早上远程连接服务器连不上,后面重启服务器,显示进入紧急修复模式:welcome to emergency mode!after logging in ,type “journalctl -xb” to ...