Below code is just for this question
I am having a class like
public User class
{
public string Name{get;set;}
public string Age{get;set;
}
This will work if your function type is "ExpandoObject".
public EmpClass
{
public string EmpName { get; set; }
public int EmpId { get; set; }
}
this.CreateMap, EmpClass>()
.ForMember(dest => dest.EmpName, src => src.MapFrom(x => x["EmpName"]))
.ForMember(dest => dest.EmpId, src => src.MapFrom(x => x["EmpId"]));
Let me know if it helps.