Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Question
- {
- public string Header { get; set; }
- public string Ask { get; set; }
- public int QuestionID { get; set; }
- public virtual ICollection<Answer> Answers { get; set; }
- }
- public class Answer
- {
- public int AnswerID { get; set; }
- public int QuestionID { get; set; }
- public int DisplayOrder { get; set; }
- public string Text { get; set; }
- public string Value { get; set; }
- public virtual Question Question { get; set; }
- }
- var questions = new List<Question>
- {
- new Question {Header="Attending Meeting:", Ask="Did you attend the meeting:", QuestionID=0 },
- new Question {Header="Overall:",Ask="Was the meeting:", QuestionID=1}
- };
- var answers = new List<Answer>
- {
- new Answer {Text="No",Value="-1",AnswerID=0,QuestionID=0,DisplayOrder=1 },
- new Answer {Text="Yes",Value="0",AnswerID=1,QuestionID=0,DisplayOrder=2}
- }
- [QuestionID] INT IDENTITY (1, 1) NOT NULL,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement