Entity Framework object graphs and viewstate
Posted by: Julia Lerman Blog - Dont Be Iffy...,
on 05 Oct 2007 |
View original | Bookmarked: 0 time(s)
I've been playing with using EF object in code-behind of aspx web pages.
The first issue to hit is postbacks.
Entity Objects are Binary Serializable so they can be stored in ViewState.
Like many other objects, you need to put your entities into viewstate (I'll deal with
session and application caching in another post). Happily entities can be binary serialized
so that happens for free when you add an entity object to ViewState.So you can
persist the entities, but you cannot persist the ObjectContext,...