public void GetStudentExamsBySubjectAndExam()
        {
            ErrorsSVM = "";
            var repo = Subject.DepCon.Resolve <IRepository <StudentExam> >();
            List <StudentExam> StudentExamsList = new List <StudentExam>();

            StudentExamsList = repo.QueryAll().ToList();
            GetExamsSVM();

            if (CurrentSubjectNameEVM != null)
            {
                GetSubjectsEV();
                CurrentSubjectEVM = SubjectsListEV.FirstOrDefault(x => x.Name == CurrentSubjectNameEVM);

                if (CurrentExamNameEVM != null)
                {
                    CurrentExamEV = ExamsListEV.FirstOrDefault(x => x.Title == CurrentExamNameEVM);

                    StudentExamsBySubjectList = StudentExamsList.FindAll(x => x.ExamId == CurrentExamEV.Id).ToList();
                }

                else
                {
                    StudentExamsBySubjectList = StudentExamsList.FindAll(x => x.Exam.SubjectId == CurrentSubjectEVM.Id);
                }
            }

            else
            {
                ErrorsSVM = "No hay ningúna Asignatura seleccionada";
            }
        }
 public void GetSubjectByStudents()
 {
     ErrorsSVM = "";
     if (CurrentSubjectNameEVM != null)
     {
         GetSubjectsEV();
         CurrentSubjectEVM = SubjectsListEV.FirstOrDefault(x => x.Name == CurrentSubjectNameEVM);
         var repo = Subject.DepCon.Resolve <IRepository <StudentSubject> >();
         SubjectByStudentsList = repo.QueryAll().Where(x => x.SubjectId == CurrentSubjectEVM.Id).ToList();
     }
     else
     {
         ErrorsSVM = "No has seleccionado ninguna asignatura";
     }
 }
        public void GetExamsSVM()
        {
            var repoExams = Subject.DepCon.Resolve <IRepository <Exam> >();

            if (CurrentSubjectNameEVM == null)
            {
                ExamsListEV = repoExams.QueryAll().ToList();
            }


            else
            {
                GetSubjectsEV();
                CurrentSubjectEVM = SubjectsListEV.FirstOrDefault(x => x.Name == CurrentSubjectNameEVM);

                ExamsListEV = repoExams.QueryAll().Where(x => x.SubjectId == CurrentSubjectEVM.Id).ToList();
            }
        }