{"action":"opened","issue":{"url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1192","repository_url":"https://api.github.com/repos/AutoMapper/AutoMapper","labels_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1192/labels{/name}","comments_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1192/comments","events_url":"https://api.github.com/repos/AutoMapper/AutoMapper/issues/1192/events","html_url":"https://github.com/AutoMapper/AutoMapper/issues/1192","id":141851357,"number":1192,"title":"Mapping explicitely base type is not working","user":{"login":"martinpaulicek","id":7778443,"avatar_url":"https://avatars.githubusercontent.com/u/7778443?v=3","gravatar_id":"","url":"https://api.github.com/users/martinpaulicek","html_url":"https://github.com/martinpaulicek","followers_url":"https://api.github.com/users/martinpaulicek/followers","following_url":"https://api.github.com/users/martinpaulicek/following{/other_user}","gists_url":"https://api.github.com/users/martinpaulicek/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpaulicek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpaulicek/subscriptions","organizations_url":"https://api.github.com/users/martinpaulicek/orgs","repos_url":"https://api.github.com/users/martinpaulicek/repos","events_url":"https://api.github.com/users/martinpaulicek/events{/privacy}","received_events_url":"https://api.github.com/users/martinpaulicek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-18T12:25:24Z","updated_at":"2016-03-18T12:25:24Z","closed_at":null,"body":"I want to map only base type **A**, but always whole type **B** gets mapped.\r\n\r\n````\r\nclass A\r\n{\r\npublic int a { get; set; }\r\n}\r\n\r\nclass B : A\r\n{\r\n\tpublic int b { get; set; }\r\n}\r\n\r\nclass AB\r\n{\r\n\tpublic int a { get; set; }\r\n\tpublic int b { get; set; }\r\n}\r\nvoid Main()\r\n{\r\n\t\r\n\t\r\n\t\r\n\tvar m = new AutoMapper.MapperConfiguration(c =>\r\n\t{\r\n\tc.CreateMap<B, A>();\r\n\tc.CreateMap<A, AB>();\r\n\tc.CreateMap<B, AB>();\r\n\t\r\n\t}).CreateMapper();\r\n\r\n\tvar b = new B() { a = 1, b = 2};\r\n\tvar a = (A)b;\r\n\t**m.Map<A, AB>(a)**.Dump();\r\n\t\r\n}\r\n\r\n````\r\nOutput:\r\na - 1 \r\nb - 2 \r\n"}}