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

            return View(subjects);
        }