Is it possible to prevent EntityFramework 4 from overwriting customized properties?

A different approach is to hook into the ObjectMaterialized event in the DbContext and set the kind there. In my DbContext constructor, i do this: ((IObjectContextAdapter)this).ObjectContext.ObjectMaterialized += new ObjectMaterializedEventHandler(ObjectMaterialized); and then the method looks like this: private void ObjectMaterialized(object sender, ObjectMaterializedEventArgs e) { Person person = e.Entity as Person; if (person != null) // the … Read more