Advertisement
Guest User

Untitled

a guest
Jun 17th, 2013
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. public class Quizs
  2. {
  3. [Key]
  4. public int QuizId { get; set; }
  5.  
  6. public string Title { get; set; }
  7.  
  8. public string Instructions { get; set; }
  9.  
  10. public string IsTimerEnabled { get; set; }
  11.  
  12. public virtual ICollection<Question> Questions { get; set; }
  13. }
  14.  
  15. public class Question
  16. {
  17. [Key]
  18. public int QuestionId { get; set; }
  19.  
  20. public virtual ICollection<Answers> Answers { get; set; }
  21.  
  22. public int RightAnswer { get; set; } // Key of Answers[]
  23.  
  24. public int QuestionType { get; set; } // 1 = One choise, 2 = Multiple Choise
  25.  
  26. public string Explantion { get; set; } // To appear after answering the question
  27.  
  28. public int MaxTime { get; set; } // In seconds
  29.  
  30. [ForeignKey("Quiz")]
  31. public int QuizId { get; set; }
  32.  
  33. public virtual Quizs Quiz { get; set; }
  34. }
  35.  
  36. public class Answers
  37. {
  38. [Key]
  39. public int asId { get; set; }
  40.  
  41. public int Id { get; set; }
  42.  
  43. public string Text { get; set; }
  44.  
  45. [ForeignKey("Questions")]
  46. public int QuestionId { get; set; }
  47.  
  48. public virtual Question Questions { get; set; }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement