实体模型不加载 [英] Entity Model does not load
问题描述
每当我试图打开我的实体模型,我得到一个不是非常有帮助的错误消息,指出该操作无法完成。所以,不幸的是我没有更具体的信息。但是,我有其他的模式,打开就好了,我没有做任何显著改变的模式,不是重命名实体等。
Whenever i try to open my Entity Model, i get a not very helpful error message stating that "the operation could not be completed". So unfortunately i don't have more specific information. However, i have other models that open just fine, and i didn't make any significant changes to the model, other than renaming entities.
是否有任何已知的解决方法这种行为?我重新启动VS和我的电脑,删除并重新添加的模式,但没有任何帮助,所以它一定是什么东西在的.edmx,我猜。但我没有用手修改和编译没有错误或警告。 : - /
Are there any known workarounds for this behaviour? I restarted VS and my PC, removed and added the model again but nothing helped, so it must be something in the .edmx, i guess. But i didn't modify it by hand and everything compiles without errors or warnings. :-/
推荐答案
我想我固定它...
我是用继承,如果你有一个0..1这可能会导致错误| ...上派生实体关联。它的修复通常是该协会设置为1 | ...关联,然后做继承,再改回来。
I was using inheritance, which can cause errors if you have a 0..1|... association on a derived entity. The fix for it is usually to set the association to a 1|... association, then do the inheritance, then change it back.
然而,在我的情况下,不知怎的把它弄坏了,但后来我离开了协会在0..1 | ...先,然后应用继承和得到错误后,将其设置为1 | ...,保存,然后设置它回来了。现在,它的工作原理。 :)
However in my case that somehow broke it, but then i left the associations at 0..1|... first, then applied inheritance and after getting the error set it to 1|... , saved and then set it back again. Now it works. :)
我真的不能等待下一个EF: - /
I really can't wait for the next EF :-/
更新:
我又有了错误,这个时候,我固定它通过在EF设计部分打开.edmx文件,并删除重复InheritanceConnectors。
I had the error again, this time i fixed it by opening the .edmx file and removing duplicate InheritanceConnectors in the EF Designer section.
这篇关于实体模型不加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!