{"action":"created","issue":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2735","repository_url":"https://api.github.com/repos/AutoMapper/AutoMapper","labels_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2735/labels{/name}","comments_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2735/comments","events_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2735/events","html_url":"https://github.com/AutoMapper/AutoMapper/issues/2735","id":345826508,"node_id":"MDU6SXNzdWUzNDU4MjY1MDg=","number":2735,"title":"Using a default namespace with AutoMapper?","user":{"login":"jez9999","id":793830,"node_id":"MDQ6VXNlcjc5MzgzMA==","avatar_url":"https://avatars3.githubusercontent.com/u/793830?v=4","gravatar_id":"","url":"https://api.github.com/users/jez9999","html_url":"https://github.com/jez9999","followers_url":"https://api.github.com/users/jez9999/followers","following_url":"https://api.github.com/users/jez9999/following{/other_user}","gists_url":"https://api.github.com/users/jez9999/gists{/gist_id}","starred_url":"https://api.github.com/users/jez9999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jez9999/subscriptions","organizations_url":"https://api.github.com/users/jez9999/orgs","repos_url":"https://api.github.com/users/jez9999/repos","events_url":"https://api.github.com/users/jez9999/events{/privacy}","received_events_url":"https://api.github.com/users/jez9999/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":23,"created_at":"2018-07-30T16:08:55Z","updated_at":"2018-08-01T16:00:20Z","closed_at":"2018-07-30T16:32:26Z","author_association":"NONE","body":"I have a complex object that I want to flatten into a destination object in AutoMapper:\r\n\r\n```\r\n\tpublic class Family {\r\n\t\tpublic Person FamilyMember { get; set; }\r\n\t\tpublic string Address { get; set; }\r\n\t}\r\n\r\n\tpublic class Person {\r\n\t\tpublic string FirstName { get; set; }\r\n\t\tpublic string Surname { get; set; }\r\n\t}\r\n\r\n\tpublic class FamilyInfo {\r\n\t\tpublic string FirstName { get; set; }\r\n\t\tpublic string Surname { get; set; }\r\n\t\tpublic string Address { get; set; }\r\n\t}\r\n\r\n\tmapper.Map<FamilyInfo>(new Family());\r\n```\r\n\r\nI could prefix the `FirstName` and `Surname` in `FamilyInfo` but then I get a bunch of ugly long member names like `FamilyMemberFirstName` and `FamilyMemberSurname` - is there a way I can configure AutoMapper with a \"default namespace\", so it basically says \"look in `DestinationObject.FamilyMember.PropertyName`, then fall back to `DestinationObject.PropertyName`?"},"comment":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/comments/409625904","html_url":"https://github.com/AutoMapper/AutoMapper/issues/2735#issuecomment-409625904","issue_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2735","id":409625904,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTYyNTkwNA==","user":{"login":"jbogard","id":104498,"node_id":"MDQ6VXNlcjEwNDQ5OA==","avatar_url":"https://avatars1.githubusercontent.com/u/104498?v=4","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":"2018-08-01T16:00:19Z","updated_at":"2018-08-01T16:00:19Z","author_association":"MEMBER","body":"That would be a departure from the current norm.\n\nOn Wed, Aug 1, 2018 at 9:50 AM Jeremy Morton <notifications@github.com>\nwrote:\n\n> I'd want a collision exception. How about opting in to collision\n> exceptions? ;-)\n>\n> —\n> You are receiving this because you were mentioned.\n>\n>\n> Reply to this email directly, view it on GitHub\n> <https://github.com/AutoMapper/AutoMapper/issues/2735#issuecomment-409602434>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAGYMhlQbL1STbW9dYWlyoiHj9F8ORDPks5uMcBCgaJpZM4VmtLR>\n> .\n>\n"}}
{"actor":{"display_login":"jbogard"}}