コード例 #1
0
 public UserStatisticViewModel(int userId, bool onlyLastResult)
 {
     _resultQuizContext = new ResultQuizContext();
     var lastResultLoaded = _resultQuizContext.Load(_resultQuizContext.GetLastQuizResultsForUserQuery(userId));
     _userContext = new UserContext();
     var result = _userContext.Load(_userContext.GetUserByIdQuery(userId));
     result.Completed += new EventHandler(result_Completed);
     lastResultLoaded.Completed += new EventHandler(lastResultLoaded_Completed);
 }
コード例 #2
0
 public UserStatisticViewModel(int userId)
 {
     _resultQuizContext = new ResultQuizContext();
     var quizResult = _resultQuizContext.Load(_resultQuizContext.GetAllQuizResultsForUserQuery(userId));
     quizResult.Completed += new EventHandler(quizResult_Completed);
     _userContext = new UserContext();
     var result = _userContext.Load(_userContext.GetUserByIdQuery(userId));
     result.Completed += new EventHandler(result_Completed);
 }
コード例 #3
0
ファイル: StatisticViewModel.cs プロジェクト: k0stya/quizApp
        public StatisticViewModel()
        {
            studentContext = new UserContext();
            var studentsLoad = studentContext.Load(studentContext.GetStudentsQuery());
            studentsLoad.Completed += new EventHandler(studentsLoad_Completed);
            groupContaxt = new GroupContext();
            groupContaxt.Load(groupContaxt.GetGroupsQuery());

            resultQuizContext = new ResultQuizContext();
        }