Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. public class Question
  2. {
  3. public string Header { get; set; }
  4. public string Ask { get; set; }
  5. public int QuestionID { get; set; }
  6. public virtual ICollection<Answer> Answers { get; set; }
  7. }
  8.  
  9. public class Answer
  10. {
  11. public int AnswerID { get; set; }
  12. public int QuestionID { get; set; }
  13. public int DisplayOrder { get; set; }
  14. public string Text { get; set; }
  15. public string Value { get; set; }
  16.  
  17. public virtual Question Question { get; set; }
  18. }
  19.  
  20. var questions = new List<Question>
  21. {
  22. new Question {Header="Attending Meeting:", Ask="Did you attend the meeting:", QuestionID=0 },
  23. new Question {Header="Overall:",Ask="Was the meeting:", QuestionID=1}
  24. };
  25.  
  26. var answers = new List<Answer>
  27. {
  28. new Answer {Text="No",Value="-1",AnswerID=0,QuestionID=0,DisplayOrder=1 },
  29. new Answer {Text="Yes",Value="0",AnswerID=1,QuestionID=0,DisplayOrder=2}
  30. }
  31.  
  32. [QuestionID] INT IDENTITY (1, 1) NOT NULL,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement