EF Mapping Helper on Code Gallery

There’s a new very cool tool on MSDN Code Gallery from the EF Team called EF Mapping Helper.

What it does is allow you to select various mapping scenarios (eg. TPH Inheritance) and the helper will display a visual image of what the mapping does and the actual XML of the CSDL, SSDL and MSL so you can see what it looks like in the actual schema.

You can combine the mapping types to see how they all look together as well.

This is a huge benefit because sometimes it’s just hard to set these things up, therefore how can you see the impact. It’s a really great way to look at this – if you are not afraid to look at XML. 🙂 (Since the visual designer can’t do everything, it’s useful (to say the least) to know how to work in the XML.)

It will also give ideas of some of the cool things you can do with mapping in an EDM that you may not have thought about. EDM’s highest power is in it’s ability to really shape your conceptual layer in ways that you can’t do with traditional ORMs. But learning all of the different ways to customize a model can be daunting. So I’m really happy to see this tool!

Here’s a view of a TPH mapping (click on image for full size)

and a view of a model that contains a TPH and TPC (table per concrete type). It’s quite dizzying, so I’d recommend looking at individual mapping scenarios first.

  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 *

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