public IActionResult ExerciseList() { var exercises = _messages.Dispatch(new GetExerciseListQuery()); var modelexer = _exerciseMapper.ToExerciseListVm(exercises); return(View(modelexer)); }
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)); }