This also seems to work for me:
Mapper.CreateMap<PersonDto, Address>();
Mapper.CreateMap<PersonDto, Person>()
.ForMember(dest => dest.Address, opt => opt.MapFrom( src => src )));
Basically, create a mapping from the dto to both objects, and then use it as the source for the child object.
More Related Contents:
- Converting from longitude\latitude to Cartesian coordinates
- How to ignore null values for all source members during mapping in Automapper 6?
- How to make elasticsearch add the timestamp field to every document in all indices?
- Automapper for Java [closed]
- Reverse / invert a dictionary mapping
- What is the best way to implement nested dictionaries?
- java.lang.IllegalArgumentException: The servlets named [X] and [Y] are both mapped to the url-pattern [/url] which is not permitted
- Mapping two integers to one, in a unique and deterministic way
- How do you create nested dict in Python?
- When do you use map vs flatMap in RxJava?
- Automapper: Update property values without creating a new object
- AutoMapper convert from multiple sources
- Does the JPA specification allow references to non-primary key columns?
- Biztalk 2010: mapping an xsd with a lot of elements with the same name
- How can I quickly estimate the distance between two (latitude, longitude) points?
- Automapper missing type map configuration or unsupported mapping – Error
- What is the best way to map windows drives using Python?
- AutoMapper: What is the difference between MapFrom and ResolveUsing?
- Using Profiles in Automapper to map the same types with different logic
- IndexOutOfRangeException Deep in the bowels of NHibernate
- Skip null values with custom resolver
- Incompatible Data Reader Exception From EF Mapped Objects
- Math – mapping numbers
- Pass Objects to AutoMapper Mapping
- How to efficiently map a org.json.JSONObject to a POJO?
- Why should anybody put annotations on the getters or setters when using JPA to map the classes?
- Entity Framework Code First Many to Many Setup For Existing Tables
- Mapping Lists using Automapper
- Class Mapping Error: ‘T’ must be a non-abstract type with a public parameterless constructor
- Why `additionalProperties` is the way to represent Dictionary/Map in Swagger/OpenAPI 2.0