Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Quizs
- {
- [Key]
- public int QuizId { get; set; }
- public string Title { get; set; }
- public string Instructions { get; set; }
- public string IsTimerEnabled { get; set; }
- public virtual ICollection<Question> Questions { get; set; }
- }
- public class Question
- {
- [Key]
- public int QuestionId { get; set; }
- public virtual ICollection<Answers> Answers { get; set; }
- public int RightAnswer { get; set; } // Key of Answers[]
- public int QuestionType { get; set; } // 1 = One choise, 2 = Multiple Choise
- public string Explantion { get; set; } // To appear after answering the question
- public int MaxTime { get; set; } // In seconds
- [ForeignKey("Quiz")]
- public int QuizId { get; set; }
- public virtual Quizs Quiz { get; set; }
- }
- public class Answers
- {
- [Key]
- public int asId { get; set; }
- public int Id { get; set; }
- public string Text { get; set; }
- [ForeignKey("Questions")]
- public int QuestionId { get; set; }
- public virtual Question Questions { get; set; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement