Beispiel #1
0
 public JsonResult GetSubjects()
 {
     var model = new SubjectsModel
     {
         Subjects = _mappingEngine.Map<IEnumerable<SubjectModel>>(_subjectService.GetSubjects())
     };
     return Json(model, JsonRequestBehavior.AllowGet);
 }
        public ActionResult ViewSchoolClassSubjects(int schoolClassEntityId)
        {
            var subjects = new SubjectsModel
            {
                Subjects =
                    _mappingEngine.Map<IEnumerable<SubjectModel>>(
                        _schoolClassSubjectService.GetSubjectsBySchoolClassEntityId(schoolClassEntityId))
            };

            return View(subjects);
        }