{"action":"created","issue":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2527","repository_url":"https://api.github.com/repos/AutoMapper/AutoMapper","labels_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2527/labels{/name}","comments_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2527/comments","events_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2527/events","html_url":"https://github.com/AutoMapper/AutoMapper/issues/2527","id":294791281,"number":2527,"title":"Flattening with MemberlistSource won't validate Properly","user":{"login":"MarkusBrgr","id":36198568,"avatar_url":"https://avatars0.githubusercontent.com/u/36198568?v=4","gravatar_id":"","url":"https://api.github.com/users/MarkusBrgr","html_url":"https://github.com/MarkusBrgr","followers_url":"https://api.github.com/users/MarkusBrgr/followers","following_url":"https://api.github.com/users/MarkusBrgr/following{/other_user}","gists_url":"https://api.github.com/users/MarkusBrgr/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkusBrgr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkusBrgr/subscriptions","organizations_url":"https://api.github.com/users/MarkusBrgr/orgs","repos_url":"https://api.github.com/users/MarkusBrgr/repos","events_url":"https://api.github.com/users/MarkusBrgr/events{/privacy}","received_events_url":"https://api.github.com/users/MarkusBrgr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-06T15:02:43Z","updated_at":"2018-02-06T15:18:45Z","closed_at":null,"author_association":"NONE","body":"<!-- For feature requests, just clear out the below \r\nTry to provide [a minimal, complete, and verifiable example](https://stackoverflow.com/help/mcve), preferably a [gist](https://gist.github.com/lbargaoanu/9c7233441c3a3413cc2b9b9ebb5964a9) that we can execute and see fail. [Here](https://gist.github.com/lbargaoanu/0cbc531306223f7ffc5468becf2642d6) is an example for ProjectTo.\r\n-->\r\n\r\n### Source/destination types\r\n\r\n```csharp\r\npublic class SrcFoo\r\n{\r\n    public string Something { get; set; }\r\n    public SrcBar SrcBar { get; set; }\r\n}\r\npublic class SrcBar\r\n{\r\n    public string Name { get; set; }\r\n}\r\n\r\npublic class FlatFoo\r\n{\r\n    public int ID { get; set; }\r\n    public string Something { get; set; }\r\n    public string SrcBarName { get; set; }\r\n}\r\n```\r\n\r\n### Mapping configuration\r\n\r\n```csharp\r\nMapper.Initialize(cfg => {\r\n    cfg.CreatMap<SrcFoo,FlatFoo>(MemberList.Source);\r\n});\r\nMapper.AssertConfigurationIsValid();\r\n```\r\n\r\n### Version: x.y.z\r\n6.2.2\r\n\r\n### Expected behavior\r\n\r\nBecause of the Naming convention, the flattening should be possible. Also the \"ID\" should be ignored because of the MemberList.\r\n\r\n### Actual behavior\r\nThe AssertConfigurationIsValid throws an Exception:\r\n```\r\nUnmapped members were found. Review the types and members below.\r\nAdd a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type\r\nFor no matching constructor, add a no-arg ctor, add optional arguments, or map all of the constructor parameters\r\n=======================================================================================================\r\nSrcFoo -> FlatFoo (Source member list)\r\nSomeProject.SrcFoo -> SomeProject.FlatFoo (Source member list)\r\n\r\nUnmapped properties:\r\nSrcBar\r\n\r\n   at AutoMapper.ConfigurationValidator.AssertConfigurationIsValid(IEnumerable`1 typeMaps)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/comments/363454264","html_url":"https://github.com/AutoMapper/AutoMapper/issues/2527#issuecomment-363454264","issue_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/2527","id":363454264,"user":{"login":"MarkusBrgr","id":36198568,"avatar_url":"https://avatars0.githubusercontent.com/u/36198568?v=4","gravatar_id":"","url":"https://api.github.com/users/MarkusBrgr","html_url":"https://github.com/MarkusBrgr","followers_url":"https://api.github.com/users/MarkusBrgr/followers","following_url":"https://api.github.com/users/MarkusBrgr/following{/other_user}","gists_url":"https://api.github.com/users/MarkusBrgr/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkusBrgr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkusBrgr/subscriptions","organizations_url":"https://api.github.com/users/MarkusBrgr/orgs","repos_url":"https://api.github.com/users/MarkusBrgr/repos","events_url":"https://api.github.com/users/MarkusBrgr/events{/privacy}","received_events_url":"https://api.github.com/users/MarkusBrgr/received_events","type":"User","site_admin":false},"created_at":"2018-02-06T15:18:45Z","updated_at":"2018-02-06T15:18:45Z","author_association":"NONE","body":"How can i then prevent mistakes in the Configuration, beside Unit Tests?"}}
{"actor":{"display_login":"MarkusBrgr"}}