public MediatorResponse <FeedbackViewModel> SendFeedback(Guid?candidateId, FeedbackViewModel feedbackViewModel) { var validationResult = _feedbackServerViewModelValidator.Validate(feedbackViewModel); if (!validationResult.IsValid) { return(GetMediatorResponse(HomeMediatorCodes.SendFeedback.ValidationError, feedbackViewModel, validationResult)); } if (_candidateServiceProvider.SendFeedback(candidateId, feedbackViewModel)) { var viewModel = InternalGetFeedbackViewModel(candidateId); return(GetMediatorResponse(HomeMediatorCodes.SendFeedback.SuccessfullySent, viewModel, ApplicationPageMessages.SendFeedbackSucceeded, UserMessageLevel.Success)); } return(GetMediatorResponse(HomeMediatorCodes.SendFeedback.Error, feedbackViewModel, ApplicationPageMessages.SendFeedbackFailed, UserMessageLevel.Warning)); }