Even though I’m a much bigger fan of distributed apps than using UI bound data binding, it’s still important for me to know how these various tools work – especially since I need to write about them in my updated E.F. book. 😉
I did not play much with Dynamic Data controls in VS2008 and just made a cool discovery in VS2010 Beta 2. This may not even be new, but as I’m sitting 30,000+ feet over the Atlantic ocean, I don’t have access to VS2008 at the moment to check.
I have a database that has a join table between two other tables.
Because the join table has only the keys of the tables that it is joining (and no other fields such as “AddedDate”, etc.), the EDM Wizard is able to create a many to many relationship between them and hide the join table. (If there were additional fields in the database table, then there would be a join entity in the model.)
I just created a new Dynamic Data website using all of the defaults except for one. Rather than automatically using every entity in the model, I selected specific entities to include in the site. Other than this, I have done absolutely no customization.
When I ran the app and opened up the People page, I was surprised to see the names of the individual beers listed in the Beer column.
But I was even more surprised when I chose to Edit the person and saw how brilliantly the Dynamic Data templates handled the Entity Data Model’s many to many relationship.
I am going to have to stop turning my nose up at these tools, though I may still have to pinch my nose for Mr. lePieu and his choice of beers. (Better get some Magic Hat onto that list!)
For RAD website development, this is pretty impressive stuff!
Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!