First look at the Entity Framework Designer

The first thing I wanted to look at after I downloaded the new Entity Framework Beta2 and Tools CTP was the EDM Designer.

The designer is displayed as the result of opening up an EDMX file. The EDMX file is the wrapper for the three Entity Data Model files (CDSL, MSL, SSDL). Therefore, you need to create a new EDM, either from a database or a blank EDM.

For the sake of familiarity, I created one based on the Northwind database and when asked, I selected all tables, all views and all stored procedures to be part of my model.

When the wizard finished it’s job, I saw this in the output window.


The new EDMX file was displayed in my solution, but I don’t see the xml files any more in the solution explorer. Opening up the EDMX file in an XML tool (rather than the default designer) I see that this contains what used to be the SSDL, the CSDL and the MSL file.

But I’ll worry about that a little later. It was time to double click on the EDMX file and see the designer!

Not only was the conceptual model laid out as expected, but there is an explorer as well where you can drill into the conceptual model and it’s entities and association sets. You can also  drill into the Storage layer.

I noticed these warnings, but if you look closely, they are just saying that the model is not able to create keys for the stored procedures so they’ll be read only. These particular sprocs are just queries for viewing, so that’s fine.

If you select an entity in the designer, you can see it’s mapping to the store model in the output window below.

This is also where you can create mappings. See how you can drop down and select other tables and views from the storage model. The Value/property items are also dropdowns for mapping.

What I didn’t see anywhere is a visual designer for the storage model or for visually mapping between the two.

I know in a screencast from (was it) February (?), the storage layer was not only part of the designer, but malleable. Perhaps we’ll see that in a future CTP.

Clicking around in the designer, you’ll find a context menu also. Here’s a function for exporting the diagram.

And playing around in the explorer you can see tooltips of the xml that represents the various bits and pieces of the schemas.

One thing I have been struggling with since the June CTP came out was stored procedures. There is finally an example that appeared in the forums today and also in the help file that came with the Beta2.

Since the designer is now the default for opening up the edmx, I need to right click on it in Solution Explorer and open with the XML Editor instead. It will be interesting to watch the cause and effect as I work from both ends now.

  Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!  

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.