public CandidateScoreViewModel PassedCandidateDetails(int id)
        {
            CandidateScoreViewModel result = new CandidateScoreViewModel();

            try
            {
                result = (from x in db.Candidates
                          join t in db.Scores on x.CandidateID equals t.CandidateID
                          where x.Pass == 1 && x.CandidateID == id
                          select new CandidateScoreViewModel {
                    candidate = x, score = t
                }).Single();
            }
            catch (Exception) { }
            return(result);
        }
        public CandidateScoreViewModel GetResult()
        {
            CandidateScoreViewModel result = new CandidateScoreViewModel();

            try
            {
                result = (from x in db.Candidates
                          join t in db.Scores on x.CandidateID equals t.CandidateID
                          where x.CandidateID == user.ID
                          select new CandidateScoreViewModel {
                    candidate = x, score = t
                }).Single();
            }
            catch (Exception) { }
            return(result);
        }