3
I am working with Entity Framework 6, I have made all the necessary settings. I have a Class Person that owns a Property of the Address Type, within address I have a property Municipality that ultimately has a property of the Type UF. I have a function that I need to recover all registered people and display on a grid, so far so good, but the data of the objects that are part of my person class, is not loaded. I used that code:
_dbcontext.Pessoas.Include(x => x.Endereco.Municipio.Uf).ToList();
When I debug the project Entityframework generates Sql correctly, I copy the sql and run in sqlserver, the data is displayed in the way I expected, but the information that the Entity brings from the database is not included in the properties of my person class, only the data existing in the person table and that are loaded.
Is there any way you can put the models in your question?
– user6026