1

I have a complex object graph which is just a set of stubs ie POCO types with an Id, which are freshly created and not attached to the context. These match up (by Id) with items already in the database. I am expecting EF to offer a means of 'hydrating' all of these stubs recursively... what's the mantra?

Tom
  • 7,994
  • 8
  • 45
  • 62

1 Answers1

2

As long as the properties are virtual this works as expected.

Tom
  • 7,994
  • 8
  • 45
  • 62
  • popular question on `virtual` for EF: http://stackoverflow.com/questions/5597760/what-effects-can-the-virtual-keyword-have-in-entity-framework-4-1-poco-code-fi – Simon_Weaver Apr 27 '13 at 10:20