public ViewResult Index()
        {
            var groupdisciplines          = _groupDisciplineService.GetAllGroupDisciplines().ToList();
            var groupDisciplineViewModels = Mapper.Map <List <GroupDiscipline>, IEnumerable <GroupDisciplineViewModel> >(groupdisciplines);

            return(View(groupDisciplineViewModels));
        }
Example #2
0
        public JsonResult GetGroupDisciplineViewModels()
        {
            var groupDisciplines          = _groupDisciplineService.GetAllGroupDisciplines();
            var groupDisciplineViewModels = Mapper.Map <IEnumerable <GroupDiscipline>, IEnumerable <GroupDisciplineViewModel> >(groupDisciplines);

            return(Json(new { groupDisciplineViewModels }, JsonRequestBehavior.AllowGet));
        }