Entity Framework Include statements loading unexpected extra data -


here's snippet of repository code:

public iqueryable<task> gettasks() {     return entities.tasks.include("categories")                             .include("categories.documents")                             .include("categories.documents.user"); } 

in model, user objects have documents navigation property which, you'll note, i'm not asking here. yet object tree results statement includes documents collection on each user and, furthermore, users on each of documents , on, way down rabbit hole.

why getting these unasked properties, , there can stop them? need single property on each user object, afaik can't "include" or "load" individual properties. i'm using db first so, again afaik, there's no straightforward way of making one-way relationship (for purposes document.user matters,not user.document).


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -