1 Answer
1

I'm guessing you're either using Entity Framework 1 or you don't have lazy loading enabled in Entity Framework 4.

In your class, you're expecting the Itens collection to be loaded. This isn't always the case as the collection will only be loaded if it was explicitly eager loaded when the Formulario object was retrieved from the database.

You need to add two lines of code and everything should be good to go:

But i'm extending the Formulario class created by the Entity Framework. Since the property is acessed when the object is instanciated, i assume the built-in Navigation property would work. But it doesn't :/
–
Rodrigo WaltenbergNov 18 '10 at 14:23