示例#1
0
        protected BasePresenter(IBaseView <T> view)
        {
            if (view != null)
            {
                View = view;
            }

            if (Context == null)
            {
                Context = new EfEntityBaseRepository <T, QuizMakerContext>();
            }
        }
 public AnswerExamPresenter(IAnswerExamView view)
 {
     if (_view == null)
     {
         _view = view;
     }
     if (_alfabeArray == null)
     {
         _alfabeArray = new[] { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'O', 'P' };
     }
     if (_context == null)
     {
         _context        = new EfEntityBaseRepository <Exam, QuizMakerContext>();
         _contextClassic = new EfEntityBaseRepository <AnswerClassic, QuizMakerContext>();
         _contextTest    = new EfEntityBaseRepository <AnswerTrueFalseTest, QuizMakerContext>();
     }
 }
示例#3
0
 public ExamViewPresenter(ICreateExamView view)
 {
     _context = new EfEntityBaseRepository <Question, QuizMakerContext>();
     _view    = view;
 }