Example #1
0
 private ExamViewModel GetExamViewModel(Exam exam)
 {
     ExamViewModel examViewModel = new ExamViewModel();
     examViewModel.ID = exam.ID;
     examViewModel.Title = exam.Title;
     examViewModel.Category = exam.Category;
     examViewModel.Description = exam.Description;
     examViewModel.QuestionCount = exam.ExamDetails.Count();
     
     return examViewModel;
 }
Example #2
0
 public void PopulateExamDetails(int examID)
 {
     OnlineExamAppDBEntities3 dbContext = new OnlineExamAppDBEntities3();
     _exam = dbContext.Exams.Where(qpa => qpa.ID == examID).FirstOrDefault();            
 }