0
    
    
        
                    hanntd created
                    
                    
                    
                
                Hi, I'm trying to map from CountryDto to CountryCreateDto but it threw the error: AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping. Although I already add Createmap for above mapping:
public SharedInformationApplicationAutoMapperProfile()
{
    /* You can configure your AutoMapper mapping configuration here.
     * Alternatively, you can split your mapping configurations
     * into multiple profile classes for a better organization. */
    CreateMap<Country, CountryDto>();
    CreateMap<Country, CountryExcelDto>();
 **   CreateMap<CountryDto, CountryCreateDto>()
        .ReverseMap();
    CreateMap<CountryDto, CountryUpdateDto>()
        .ReverseMap();**
I call the mapping here and threw the error: if (editModel != null && e.IsNew) { await CountriesAppService.CreateAsync(ObjectMapper.Map<CountryDto, CountryCreateDto>(editModel)); }
2 Answer(s)
- 
    0
Hi,
in what project is the exception thrown? You might need to add the mapping inside the UI Layer´s AutoMapperProfile.
Please let me know what UI Layer you use and if your application is tiered (seperated auth server)
 - 
    0
Thanks, I forgot to add the mapping for the UI Layer, now it already worked.