{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/1382","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/1382/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/1382/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/1382/events","html_url":"https://github.com/aspnet/EntityFramework/issues/1382","id":53902048,"number":1382,"title":"Design meeting discussion:January 8, 2015","user":{"login":"ajcvickers","id":1430078,"avatar_url":"https://avatars.githubusercontent.com/u/1430078?v=3","gravatar_id":"","url":"https://api.github.com/users/ajcvickers","html_url":"https://github.com/ajcvickers","followers_url":"https://api.github.com/users/ajcvickers/followers","following_url":"https://api.github.com/users/ajcvickers/following{/other_user}","gists_url":"https://api.github.com/users/ajcvickers/gists{/gist_id}","starred_url":"https://api.github.com/users/ajcvickers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajcvickers/subscriptions","organizations_url":"https://api.github.com/users/ajcvickers/orgs","repos_url":"https://api.github.com/users/ajcvickers/repos","events_url":"https://api.github.com/users/ajcvickers/events{/privacy}","received_events_url":"https://api.github.com/users/ajcvickers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/aspnet/EntityFramework/milestones/9","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/milestones/9/labels","id":692755,"number":9,"title":"Discussions","description":"<!--\r\n@huboard:{\"order\":101}\r\n-->","creator":{"login":"rowanmiller","id":4741851,"avatar_url":"https://avatars.githubusercontent.com/u/4741851?v=3","gravatar_id":"","url":"https://api.github.com/users/rowanmiller","html_url":"https://github.com/rowanmiller","followers_url":"https://api.github.com/users/rowanmiller/followers","following_url":"https://api.github.com/users/rowanmiller/following{/other_user}","gists_url":"https://api.github.com/users/rowanmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/rowanmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rowanmiller/subscriptions","organizations_url":"https://api.github.com/users/rowanmiller/orgs","repos_url":"https://api.github.com/users/rowanmiller/repos","events_url":"https://api.github.com/users/rowanmiller/events{/privacy}","received_events_url":"https://api.github.com/users/rowanmiller/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":16,"state":"open","created_at":"2014-06-16T19:38:35Z","updated_at":"2015-01-09T19:39:41Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-01-09T18:59:31Z","updated_at":"2015-01-09T21:30:34Z","closed_at":null,"body":"This issue is for discussion of the EF design meeting on January 8, 2015.\r\n\r\nItems discussed were:\r\n* Mulit-level Include syntax\r\n\r\nPlease comment on this issue to provide feedback, ask questions, etc."},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/69402227","html_url":"https://github.com/aspnet/EntityFramework/issues/1382#issuecomment-69402227","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/1382","id":69402227,"user":{"login":"MikaelEliasson","id":888296,"avatar_url":"https://avatars.githubusercontent.com/u/888296?v=3","gravatar_id":"","url":"https://api.github.com/users/MikaelEliasson","html_url":"https://github.com/MikaelEliasson","followers_url":"https://api.github.com/users/MikaelEliasson/followers","following_url":"https://api.github.com/users/MikaelEliasson/following{/other_user}","gists_url":"https://api.github.com/users/MikaelEliasson/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelEliasson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelEliasson/subscriptions","organizations_url":"https://api.github.com/users/MikaelEliasson/orgs","repos_url":"https://api.github.com/users/MikaelEliasson/repos","events_url":"https://api.github.com/users/MikaelEliasson/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelEliasson/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T21:30:34Z","updated_at":"2015-01-09T21:30:34Z","body":"For the syntax I'm wondering if you have considered using Include\r\n\r\n```\r\ncategories\r\n    .Include(c => c.Products.Include(p => p.Reviews.Include(r => r.Author))\r\n                                          .Include(p => p.Supplier));\r\n```\r\n\r\nAs far as I understood you are going to rewrite how Include works so it doesn't use the cartesian product but instead multi query and merge in memory? That would be awesome considering the EF6 version in very ineffecient in most cases (except queries that are cheap anyway). \r\n\r\nChildcollection filtering and sorting might be quite easy to implement in that case. Atleast on the leaf nodes. I think it would be worth considering when you think about the syntax. Personally I think most suggestions work quite well for that as long as you use the linq syntax. \r\n\r\n ```\r\ncategories\r\n    .Include(c => c.Products.Where(p => p.Name == searchTerm).OrderBy(p => p.Cost));\r\n```\r\n\r\nI'm not suggesting you should do that now. But it might be something that could happen in the future and therefore worth considering when designing the API.\r\n\r\n"}}