使用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. c++11 多线程依次打印ABC

    并发 练习代码 #include <thread> #include <vector> #include <mutex> #include <iostream ...

  2. 学习selenium的过程

  3. 关于使用的xshll和xftp中乱码咋办?

    1.Xshll中 2.Xftp中同理都是一样的设置

  4. [ASP.net]web.config的customErrors与httpErrors的区别

    之前一直知道设置web.config(其实就是xml文件)的customErrors的error来指向自定义的错误页的URL,但是今天在调试的时候发现customErrors无法跳转到自定义的页面,在 ...

  5. 2016-2017-2 20155312 实验二《Java面向对象程序设计》实验报告

    知识总结 伪代码 产品代码 Java编程时,程序员对类实现的测试叫单元测试. 测试用例是为某个特殊目标而编制的一组测试输入.执行条件以及预期结果,以便测试某个程序路径或核实是否满足某个特定需求. 先写 ...

  6. Java ClassLoad详解

    Java ClassLoad详解 类加载器是 Java 语言的一个创新,也是 Java 语言流行的重要原因之一.它使得 Java 类可以被动态加载到 Java 虚拟机中并执行.类加载器从 JDK 1. ...

  7. css固宽截取字符串

    width:200px; white-space:nowrap; word-break:keep-all; overflow:hidden; text-overflow:ellipsis; 移动端支持 ...

  8. Linux网桥模式配置

    Linux网关模式下将有线LAN和无线LAN共享网段实现局域网内互联: 思路其实很简单:就是将虚拟出一个bridge口,将对应的有线LAN和无线LAN都绑定在这个虚拟bridge口上,并给这个brid ...

  9. C#中string类型是值类型还是引用类型?(转)

    出处:https://www.cnblogs.com/dxxzst/p/8488567.html .Net框架程序设计(修订版)中有这样一段描述:String类型直接继承自Object,这使得它成为一 ...

  10. (1)There's more to life than being happy

    https://www.ted.com/talks/emily_esfahani_smith_there_s_more_to_life_than_being_happy00:12 I used to ...