public ActionResult GetClassResultWithStudent(ResultByClassViewModel viewModel) { var result = db.Results.Where(i => i.ClassId == viewModel.ClassId).OrderBy(i => i.Subject.Name).ThenBy(i => i.Student.Name).ToList(); viewModel.ResultWithStudent = result; return(PartialView("_ResultByClass", viewModel)); }
public ActionResult ResultByClass(ResultByClassViewModel viewModel) { return(RedirectToAction("ResultByClass", new { SchoolId = viewModel.ClassId })); }