I have a List of QuestionData. The QuestionData class is explained below:
class QuestionData
{
public string Question { get; set; }
public List<Option> Answers { get; set; }
}
I am using EF as ORM (Note: Question and Option used in QuestionData both are EF’s auto generated entities).
Both tables (Questions and Options) have PK-FK relationship. I want to fill list of QuestionData as I have to display Questions and answers under them. How do I fill QuestionData?
1 Answer