A hint of what to look for in Entity Framework Beta3

I’ve found that the best resource for learning about ENtity Framework is in the forums. Today I finally saw a public statement about something I”ve been waiting for for a long time.

Brian Dawson says:

We’ve been working on making the WCF experience, especially with relationships, a much better experience no matter which serialization scheme you choose. Binary serialization has been working already, but in the cases where we are doing other types of serialization, dealing with relationships was tricky and we purposely don’t deal with deep serialization, at least in this release. What we did do was add the EntityKey as a serializational property on the relationship reference. This way, if you serialize Product, you’ll get the EntityKey for Category. You can treat the CategoryReference.EntityKey  similar to a foreign key. Basically, this allows you to fetch entities with the key, and also do updates and deletes without having to rebuild all the dependant ends.  We are targeting Beta3 for some additional information in this specific area.

What he’s talking about is this: when you do binary serliaziont of an object graph (i.e. and entity and anything that is attached to it) you get the whole thing, but if you do xml serialization, you only get the entity. That makes doing web services a nightmare. I have written a few posts about dealing with this using the current Beta 2 bits of Entity Framework. Here’s the critical one : XML Serializing Entity Framework Entities With Their Children For SOA.

Another critical problem is that you lose all of your statemanagement. Here’s a post I wrote about how to recreate state so tha tyou can do updates, etc. More on Disconnected Entity Framework

If you watch the forums you may have noticed that there have been a lot of people hammering on the team. On one thread about this topic which I would not let go, Danny SImmons finally responded:

This thread is getting way out of hand, and clearly we need to get some better guidance together on all of this (a few good blog posts at least).  

So, instead of writing blog posts and guidance (unless you count mine) they went to work on the bits! Happily they are going to make it a lot easier in Beta 3 enabling us to not only rebuild full graphs, but reconstituting the state.

  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.