{"action":"created","issue":{"url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/79","repository_url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus","labels_url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/79/comments","events_url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/79/events","html_url":"https://github.com/zzzprojects/EntityFramework-Plus/issues/79","id":189161442,"number":79,"title":"Query IncludeFilter with AsNoTracking","user":{"login":"tojo4","id":23458324,"avatar_url":"https://avatars.githubusercontent.com/u/23458324?v=3","gravatar_id":"","url":"https://api.github.com/users/tojo4","html_url":"https://github.com/tojo4","followers_url":"https://api.github.com/users/tojo4/followers","following_url":"https://api.github.com/users/tojo4/following{/other_user}","gists_url":"https://api.github.com/users/tojo4/gists{/gist_id}","starred_url":"https://api.github.com/users/tojo4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tojo4/subscriptions","organizations_url":"https://api.github.com/users/tojo4/orgs","repos_url":"https://api.github.com/users/tojo4/repos","events_url":"https://api.github.com/users/tojo4/events{/privacy}","received_events_url":"https://api.github.com/users/tojo4/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"zzzprojects","id":11062426,"avatar_url":"https://avatars.githubusercontent.com/u/11062426?v=3","gravatar_id":"","url":"https://api.github.com/users/zzzprojects","html_url":"https://github.com/zzzprojects","followers_url":"https://api.github.com/users/zzzprojects/followers","following_url":"https://api.github.com/users/zzzprojects/following{/other_user}","gists_url":"https://api.github.com/users/zzzprojects/gists{/gist_id}","starred_url":"https://api.github.com/users/zzzprojects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzzprojects/subscriptions","organizations_url":"https://api.github.com/users/zzzprojects/orgs","repos_url":"https://api.github.com/users/zzzprojects/repos","events_url":"https://api.github.com/users/zzzprojects/events{/privacy}","received_events_url":"https://api.github.com/users/zzzprojects/received_events","type":"User","site_admin":false},"assignees":[{"login":"zzzprojects","id":11062426,"avatar_url":"https://avatars.githubusercontent.com/u/11062426?v=3","gravatar_id":"","url":"https://api.github.com/users/zzzprojects","html_url":"https://github.com/zzzprojects","followers_url":"https://api.github.com/users/zzzprojects/followers","following_url":"https://api.github.com/users/zzzprojects/following{/other_user}","gists_url":"https://api.github.com/users/zzzprojects/gists{/gist_id}","starred_url":"https://api.github.com/users/zzzprojects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzzprojects/subscriptions","organizations_url":"https://api.github.com/users/zzzprojects/orgs","repos_url":"https://api.github.com/users/zzzprojects/repos","events_url":"https://api.github.com/users/zzzprojects/events{/privacy}","received_events_url":"https://api.github.com/users/zzzprojects/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-11-14T16:40:24Z","updated_at":"2016-11-15T14:37:08Z","closed_at":null,"body":"Hi all,\r\n\r\nwe are trying to use the Query IncludeFilter feature on a query with the AsNoTracking attribute. We noticed that all of the navigation properties, which are supposed to be included, are null.\r\n\r\nIs this a known issue, and is there any workaround we can use?\r\n\r\nRegards,\r\nTom\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/comments/260657518","html_url":"https://github.com/zzzprojects/EntityFramework-Plus/issues/79#issuecomment-260657518","issue_url":"https://api.github.com/repos/zzzprojects/EntityFramework-Plus/issues/79","id":260657518,"user":{"login":"zzzprojects","id":11062426,"avatar_url":"https://avatars.githubusercontent.com/u/11062426?v=3","gravatar_id":"","url":"https://api.github.com/users/zzzprojects","html_url":"https://github.com/zzzprojects","followers_url":"https://api.github.com/users/zzzprojects/followers","following_url":"https://api.github.com/users/zzzprojects/following{/other_user}","gists_url":"https://api.github.com/users/zzzprojects/gists{/gist_id}","starred_url":"https://api.github.com/users/zzzprojects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzzprojects/subscriptions","organizations_url":"https://api.github.com/users/zzzprojects/orgs","repos_url":"https://api.github.com/users/zzzprojects/repos","events_url":"https://api.github.com/users/zzzprojects/events{/privacy}","received_events_url":"https://api.github.com/users/zzzprojects/received_events","type":"User","site_admin":false},"created_at":"2016-11-15T14:37:08Z","updated_at":"2016-11-15T14:37:08Z","body":"Unfortunately, our library transforms the query to an anonymous type\r\n\r\nFrom\r\n```csharp\r\nctx.Association_OneToMany_Lefts\r\n     .IncludeFilter(x => x.Rights.OrderByDescending(y => y.ID))\r\n     .AsNoTracking().ToList();\r\n```\r\nTo\r\n```csharp\r\nctx.Association_OneToMany_Lefts\r\n    .Select(x => new {x, x.Rights})\r\n    .AsNoTracking().ToList();\r\n```\r\n\r\nTo add relation included (in both example) automatically, the ChangeTracking must be enabled.\r\n\r\nWe will check this weekend if we can find a workaround. I believe the only possible solution will be to create a new context and use the change tracker within it when we found the \"AsNoTracking\" method is used. So the passed context will not be impacted by the performance and will not track entities returned either.\r\n\r\n"}}
{"actor":{"display_login":"zzzprojects"}}