Hi,
I am facing a issue, I have a class called Question and i want to write a converter Question to Subject. How can i write a converter. Conversion happen on dynamic not static.
Input class
public class Question
{
public int SubjectId { get; set; }
public string SubjectName { get; set; }
public int SubjectOrder { get; set; }
public string SubjectDescription { get; set; }
public int QuestionId { get; set; }
public string QuestionName { get; set; }
public int QuestionOrder { get; set; }
public string QuestionDescription { get; set; }
}
Output Class
public class Subject {
public int SubjectId { get; set; }
public string SubjectName { get; set; }
public int SubjectOrder { get; set; }
public string SubjectDescription { get; set; }
public List QuestionDetails { get; set; }
}
public class QuestionDetail {
public int QuestionId { get; set; }
public string QuestionName { get; set; }
public int QuestionOrder { get; set; }
public string QuestionDescription { get; set; }
}
How can i do that. Please help me.

Kiran ThakurPosted Aug 12, 2016, 10:23 PM
Tapan PatelPosted Aug 12, 2016, 9:53 PM