{"action":"created","issue":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1149","repository_url":"https://api.github.com/repos/AutoMapper/AutoMapper","labels_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1149/labels{/name}","comments_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1149/comments","events_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1149/events","html_url":"https://github.com/AutoMapper/AutoMapper/issues/1149","id":137397076,"number":1149,"title":"Support EF Self Referencing Model and ViewModel Mapping","user":{"login":"rabbal","id":6818642,"avatar_url":"https://avatars.githubusercontent.com/u/6818642?v=3","gravatar_id":"","url":"https://api.github.com/users/rabbal","html_url":"https://github.com/rabbal","followers_url":"https://api.github.com/users/rabbal/followers","following_url":"https://api.github.com/users/rabbal/following{/other_user}","gists_url":"https://api.github.com/users/rabbal/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbal/subscriptions","organizations_url":"https://api.github.com/users/rabbal/orgs","repos_url":"https://api.github.com/users/rabbal/repos","events_url":"https://api.github.com/users/rabbal/events{/privacy}","received_events_url":"https://api.github.com/users/rabbal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-02-29T22:23:10Z","updated_at":"2016-03-01T21:28:07Z","closed_at":null,"body":"hi,\r\nthanks for this project .\r\nIn more senario we need to use Self Referencing Models for example Comment System. link following model:\r\n\r\n```\r\npublic class BlogComment\r\n{\r\n    public int Id { set; get; }\r\n\r\n    [MaxLength]\r\n    public string Body { set; get; }\r\n\r\n    public virtual BlogComment Reply { set; get; }\r\n    public int? ReplyId { get; set; }\r\n    public ICollection<BlogComment> Children { get; set; }\r\n}    \r\n```\r\nand we can select just one list and then EF can make tree with linq to object like this:\r\n```\r\nusing (var ctx = new MyContext())\r\n            {\r\n                var list = ctx.BlogComments\r\n                          //.where ...\r\n                          .ToList() // fills the childs list too\r\n                          .Where(x => x.Reply == null) // for TreeViewHelper                        \r\n                          .ToList();\r\n            }\r\n```\r\n\r\nwhen using CommentViewModel for Select , and then make tree with linq to object , the dynamic Proxy that Generated by EF is destroyed .\r\nIs Supported Mapping Between CommentViewModel that have ICollection<CommentViewModel> and Comment ?\r\n\r\nthanks , \r\ngholamreza rabbal"},"comment":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/comments/190912812","html_url":"https://github.com/AutoMapper/AutoMapper/issues/1149#issuecomment-190912812","issue_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1149","id":190912812,"user":{"login":"jbogard","id":104498,"avatar_url":"https://avatars.githubusercontent.com/u/104498?v=3","gravatar_id":"","url":"https://api.github.com/users/jbogard","html_url":"https://github.com/jbogard","followers_url":"https://api.github.com/users/jbogard/followers","following_url":"https://api.github.com/users/jbogard/following{/other_user}","gists_url":"https://api.github.com/users/jbogard/gists{/gist_id}","starred_url":"https://api.github.com/users/jbogard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbogard/subscriptions","organizations_url":"https://api.github.com/users/jbogard/orgs","repos_url":"https://api.github.com/users/jbogard/repos","events_url":"https://api.github.com/users/jbogard/events{/privacy}","received_events_url":"https://api.github.com/users/jbogard/received_events","type":"User","site_admin":false},"created_at":"2016-03-01T21:28:07Z","updated_at":"2016-03-01T21:28:07Z","body":"Where's the Select LINQ projection? You'd need to include that to if you want to see how it would work with ProjectTo."}}