{"action":"created","issue":{"url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/123","labels_url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/123/comments","events_url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/123/events","html_url":"https://github.com/leekelleher/umbraco-ditto/issues/123","id":111179009,"number":123,"title":"Suggestion for a 'CurrentChildrenAs<>' value resolver attribute","user":{"login":"BarryFogarty","id":2164279,"avatar_url":"https://avatars.githubusercontent.com/u/2164279?v=3","gravatar_id":"","url":"https://api.github.com/users/BarryFogarty","html_url":"https://github.com/BarryFogarty","followers_url":"https://api.github.com/users/BarryFogarty/followers","following_url":"https://api.github.com/users/BarryFogarty/following{/other_user}","gists_url":"https://api.github.com/users/BarryFogarty/gists{/gist_id}","starred_url":"https://api.github.com/users/BarryFogarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BarryFogarty/subscriptions","organizations_url":"https://api.github.com/users/BarryFogarty/orgs","repos_url":"https://api.github.com/users/BarryFogarty/repos","events_url":"https://api.github.com/users/BarryFogarty/events{/privacy}","received_events_url":"https://api.github.com/users/BarryFogarty/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/leekelleher/umbraco-ditto/labels/discussion","name":"discussion","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-10-13T13:25:46Z","updated_at":"2015-10-16T10:01:51Z","closed_at":null,"body":"What do you think on adding an attribute-based value resolver along the lines of CurrentChildrenAs<T>, which would attempt to return a collection of children of the given type?\r\n\r\nEssentially I see it as a shorthand to creating a custom value resolver returning:\r\n\r\n`Content.Children.Where(x => x.DocumentTypeAlias == \"Type\").As<Type>();`\r\n\r\nWould be nice to be able to specify the type and the doctype alias in the attribute, but even just a convention like \r\n\r\n`[CurrentChildrenAs(typeof(Comment))]` or\r\n`[CurrentChildrenAs(typeof(Comment), \"UmbComment\")]`\r\n\r\nwhich would be used to decorate a property like\r\n\r\n`public IEnumerable<Comment> Children { get; set; }`\r\n"},"comment":{"url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/comments/148673000","html_url":"https://github.com/leekelleher/umbraco-ditto/issues/123#issuecomment-148673000","issue_url":"https://api.github.com/repos/leekelleher/umbraco-ditto/issues/123","id":148673000,"user":{"login":"BarryFogarty","id":2164279,"avatar_url":"https://avatars.githubusercontent.com/u/2164279?v=3","gravatar_id":"","url":"https://api.github.com/users/BarryFogarty","html_url":"https://github.com/BarryFogarty","followers_url":"https://api.github.com/users/BarryFogarty/followers","following_url":"https://api.github.com/users/BarryFogarty/following{/other_user}","gists_url":"https://api.github.com/users/BarryFogarty/gists{/gist_id}","starred_url":"https://api.github.com/users/BarryFogarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BarryFogarty/subscriptions","organizations_url":"https://api.github.com/users/BarryFogarty/orgs","repos_url":"https://api.github.com/users/BarryFogarty/repos","events_url":"https://api.github.com/users/BarryFogarty/events{/privacy}","received_events_url":"https://api.github.com/users/BarryFogarty/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T10:01:51Z","updated_at":"2015-10-16T10:01:51Z","body":"@leekelleher Of course - makes perfect sense now!  I think an example of this mapping in the docs would be really useful for others.  Also a good way to illustrate the use of `virtual` as @JimBobSquarePants mentioned."}}