コード例 #1
0
        public IActionResult ExerciseList()
        {
            var exercises = _messages.Dispatch(new GetExerciseListQuery());
            var modelexer = _exerciseMapper.ToExerciseListVm(exercises);

            return(View(modelexer));
        }
コード例 #2
0
        public IActionResult List(string name)
        {
            var exercises = _messages.Dispatch(new GetExerciseListQuery(name));
            var classes   = _messages.Dispatch(new GetClassListQuery());
            var model     = new ExerciseListVm();
            var classesvm = _schoolClassMapper.ToClassVm(classes);

            model.Classes = classesvm.OrderBy(x => Helper.GetClassNumberFromClassName(x.Name)).ToList();

            var modelexer = _exerciseMapper.ToExerciseListVm(exercises);

            model.Exercises = modelexer;
            return(View(model));
        }