zoukankan      html  css  js  c++  java
  • 调查一下,EF的Bug?

    数据库中有3表Person、Student、Worker。代码如下:

    Code

    现在在VS里建个ADO.NET Entity Data Model,就叫默认的Model1.edmx好了,操作如下:

    1、建立Model1.edmx时,在数据库中只选择Person表,完成Model1.edmx

    2、编译,通过

    3、现在从数据库中更新,把Student和Worker都添加进来,这是会看到设计器自动把实体和关系都一并生成出来,还算蛮聪明的

    4、编译,还是通过

    5、Bug开始来了,把Student和Worker实体删除

    6、编译,出错,我在中文版和英文版都试过(打正式sp1的,team system),错误如下:

    Error    1    Error 3013: Problem in Mapping Fragment starting at line 144: Missing table mapping: Foreign key constraint 'FK_Student_Person' from table Student (PersonID_FK) to table Person (PersonID): no mapping specified for the table Student.
    Error    2    Error 3013: Problem in Mapping Fragment starting at line 144: Missing table mapping: Foreign key constraint 'FK_Worker_Person' from table Worker (PersonID_FK) to table Person (PersonID): no mapping specified for the table Worker.

    按照微软讲师王然在webcast的说法,EF有时没有自动把后台代码删除完整,当时那webcast演示也是出错所以终止的。但他说是因为他的是beta版的原因。但我这几天测试了N次,发现在sp1正式版也出现这情况……郁闷

    大家也出现过这现象吗?

  • 相关阅读:
    Ubuntu环境下mysql常见的操作
    Ubuntu 下 Galera cluster for MySQL 集群安装
    Linux如何查看进程、杀死进程、启动进程等常用命令
    Ubuntu16.04配置静态IP地址
    Linux软件包管理之源码包、脚本安装包
    Linux软件包管理之yum在线管理
    Linux软件包管理之RPM命令
    Linux文本编辑器vim
    Linux常用命令之网络和关机重启命令
    Linux常用命令之压缩和解压缩命令
  • 原文地址:https://www.cnblogs.com/Dreaming/p/1280024.html
Copyright © 2011-2022 走看看