views:

82

answers:

2

Hey guys

I have an edmx model which I have draged 2 tables onto - One called 'File' and the other 'ApplicaitonFile'. These two tables have a 1 to 1 relationship in the database. If I stop here everything works fine.

But in my model, I want 'ApplicaitonFile' to inherit from 'File'. So I delete the 1 to 1 relationship then configure 'ApplicaitonFile' from 'File' and then remove the FileId from 'ApplicaitonFile' which was the primary key. (Note I am following the instructions from here).

If I leave the model open at this point everything is fine, but as soon as I close it, if I try and reopen it again I get the following error "The operation could not be completed".

I have been searching for a solution and found this - http://stackoverflow.com/questions/944050/entity-model-does-not-load but as far as I can tell I don't have a duplicate InheritanceConnectors (although I don't know exactly what I'm looking for but I can't see anything out of the ordinary - like 2 connectors with the same name) and the relationship I originally have is a 1 to 1 not a 1 to 0..1

Any ideas???

A: 

I have had issues with EDMX files not opening becuase of layout issues. When it happens i got the "The operation could not be completed."

Try this (please make sure you back up your model).

Open up your model using VS XML Editor (right click open with).

Remove or comment out the section

<edmx:Edmx ...
  ...
  <edmx:Designer>

    <edmx:Diagrams>
       <Diagram>
           //Comment these out   ...
        </Diagram>
    </edmx:Diagrams>
   </edmx:Designer>
 </edmx:Edmx>

so it would become:

<edmx:Edmx ...
  ...
  <edmx:Designer>

    <edmx:Diagrams>
       <!--
       <Diagram>

        </Diagram>
       -->
    </edmx:Diagrams>
   </edmx:Designer>
 </edmx:Edmx>

Then close and reopen the model. If it works* you need to remove the stuff you commented out. Worked for me, hopefuly it works for you.

Nix
Cheers I'll give it a go
vdh_ant