public MediatorResponse <TraineeshipApplicationViewModel> PromoteToInProgress(TraineeshipApplicationViewModel traineeshipApplicationViewModel) { var validationResult = _traineeshipApplicationViewModelServerValidator.Validate(traineeshipApplicationViewModel); if (!validationResult.IsValid) { return(GetMediatorResponse(TraineeshipApplicationMediatorCodes.PromoteToInProgress.FailedValidation, traineeshipApplicationViewModel, validationResult)); } try { _applicationProvider.UpdateTraineeshipApplicationViewModelNotes(traineeshipApplicationViewModel.ApplicationSelection.ApplicationId, traineeshipApplicationViewModel.Notes, false); _applicationProvider.SetTraineeshipStateInProgress(traineeshipApplicationViewModel.ApplicationSelection); return(GetMediatorResponse(TraineeshipApplicationMediatorCodes.PromoteToInProgress.Ok, traineeshipApplicationViewModel)); } catch (Exception) { var viewModel = GetFailedUpdateTraineeshipApplicationViewModel(traineeshipApplicationViewModel.ApplicationSelection); return(GetMediatorResponse(TraineeshipApplicationMediatorCodes.PromoteToInProgress.Error, viewModel, ApplicationViewModelMessages.UpdateNotesFailed, UserMessageLevel.Error)); } }