I am trying to map multiple domain models to one view model. I found this link which is able to do just that. However, I have several domain model properties that do not exist in the view model. When I try to map the models, I am getting the error:
Missing type map configuration or unsupported mapping.
This is because I am not ignoring the other properties. All the answers I've seen mention using option.Ignore() on the Mapper.CreateMap function. However, in the link I provided, the Mapper.CreateMap function is not used. The only call to AutoMapper is:
Mapper.Map(source, destination, sourceType, destinationType);
How can I do the ignore in this case? Or is there a better way to do both mapping multiple models and ignoring properties?