views:

264

answers:

3

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.

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. :-/

A: 

Here is what I'd do. I would cut pieces of data from edmx (or whatever file is the source) file to see when the designer starts loading it again. This way I'd pinpoint the problem.

Miha Markic
A: 

Now that is strange. If you haven't manipulated EDMX file by hand (nor did anyone else) then it must be EFDesigner. Everybody knows its more in pre beta version than anything serious. Have you tried part by part changes?

Robert Koritnik
+1  A: 

I guess i fixed it...

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.

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. :)

I really can't wait for the next EF :-/

UPDATE:

I had the error again, this time i fixed it by opening the .edmx file and removing duplicate InheritanceConnectors in the EF Designer section.

Botz3000