Entity Framework model won’t open

The entity framework creates a model of your database, a .edmx file.  If you open the file and close it, then you can’t open it again until you close visual studio and reopen it.  That no fun.

Here’s a work around, right click you edmx file and choose Open With…
image
You will get a choice of what you want to open the model with.  If you choose XML Editor you will be able to open just the xml.  (If may warn you that your model is already open and will ask if it can close it, choose yes).
Now it’s open, but you see all the XML.
Right click on the edmx file again and choose Open.

Your model will open back in the familiar view that your used to.

Advertisements

2 thoughts on “Entity Framework model won’t open

  1. Hey Chris,
    Two FYIs for you.
    1) As far as I know, this behavior only happens when you modify the EDMX in the designer and close without saving changes.
    2) It’s fixed in EF4. It was one of the first things I looked for! 🙂

    Julie

Got something to add?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s