Пример #1
0
        public JsonResult GetCourses()
        {
            Mapper.CreateMap <CoursDTO, CoursViewModel>();
            var courses = Mapper.Map <IEnumerable <CoursDTO>, List <CoursViewModel> >(crmService.GetCourses());

            return(Json(courses, JsonRequestBehavior.AllowGet));
        }