public ViewResult Index()
        {
            var aDVM =
                Mapper.Map <IEnumerable <AcademicDiscipline>, IEnumerable <AcademicDisciplineViewModel> >(
                    _academicDisciplineService.GetAll());

            return(View(aDVM));
        }
Пример #2
0
 public ActionResult Create()
 {
     ViewBag.DisciplineId = new SelectList(_academicDisciplineService.GetAll(), "Id", "Code");
     ViewBag.GroupId      = new SelectList(_groupService.GetAllGroups(), "Id", "Code");
     ViewBag.LessonTypes  =
         _lessonService.GetLessonTypes()
         .Select(type => new SelectListItem {
         Selected = false, Text = type.Name, Value = type.Id.ToString()
     }).ToList();
     return(View());
 }