协会到底是不是映射到ADO实体框架 [英] Association end is not mapped in ADO entity framework

查看:106
本文介绍了协会到底是不是映射到ADO实体框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始用ADO.net实体框架我已制订两个表一起,收到以下错误:

I am just starting out with ADO.net Entity Framework I have mapped two tables together and receive the following error:

Error   1   Error 11010: Association End 'OperatorAccess' is not mapped.    E:\Visual Studio\projects\Brandi II\Brandi II\Hospitals.edmx    390 11  Brandi II

不知道这是什么,我做错了

Not sure what it is I am doing wrong

推荐答案

实体框架设计者是可怕的 - 我有同样的问题,很多时候(和你的问题太多,克雷格):

The Entity Framework designer is terrible - I've had the same problem many times (and your problem too, Craig):

会出现这种情况,当你有一个多到一的关联是不恰当的设置他们可以的很容易的修复设计,使这个过程变得简单。而是,我们必须忍受这废话。

This happens when you have a many-to-one association which is improperly setup. They could very easily fix the designer to make this process simple; but instead, we have to put up with this crap.

  • 单击上的关联,并转到的的映射详细信息的看法。
  • 在联想,点击的地图到<表名> 的。选择表(S),从而弥补了的许多的关系的边(即表(S),从而弥补了在设计师协会的*端)
  • 的,选择表列其映射到每个实体端属性。 当这些条目之一是空白您收到此错误。
  • Click on the association, and go to the mapping details view.
  • Under association, click on Maps to <tablename>. Choose the table(s) which make up the many side of the relationship (ie. the table(s) which make up the *-side of the association in the designer)
  • Under Column, choose the table-columns which map to each entity-side Property. You get this error when one of those entries are blank.

这篇关于协会到底是不是映射到ADO实体框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆