private async void OpenEditExerciseDialogAsync(Exercise exercise)
        {
            var exerciseClone = exercise.Clone();

            var dialog = _dialogs.For <ExerciseDialogViewModel>(DialogsIdentifier);

            dialog.Data.Exercise          = ExerciseViewModel.FromModel(exerciseClone);
            dialog.Data.SubmitButtonTitle = "Save";
            dialog.Data.DialogTitle       = "Modified exercise";

            var dialogResult = await dialog.Show();

            if (dialogResult != DialogResult.Ok)
            {
                return;
            }

            exerciseClone = dialog.Data.Exercise.ToModel();
            Exercises.Replace(exercise, exerciseClone);
            _exerciseRepository.Update(exerciseClone);
        }
        private async void OpenCreateExerciseDialogAsync()
        {
            var exercise = new Exercise
            {
                ContractionType = ContractionType.Dynamic,
            };

            var dialog = _dialogs.For <ExerciseDialogViewModel>(DialogsIdentifier);

            dialog.Data.DialogTitle       = "New exercise";
            dialog.Data.SubmitButtonTitle = "Create";
            dialog.Data.Exercise          = ExerciseViewModel.FromModel(exercise);

            var dialogResult = await dialog.Show();

            if (dialogResult != DialogResult.Ok)
            {
                return;
            }

            exercise = dialog.Data.Exercise.ToModel();
            Exercises.Add(exercise);
            _exerciseRepository.Create(exercise);
        }