/// <summary>
        /// Adds a new feedback or updates existent feedback for the specified track.
        /// </summary>
        /// <param name="feedbackViewModel">
        /// The user feedback.
        /// </param>
        public void AddOrUpdateFeedback(FeedbackViewModel feedbackViewModel)
        {
            if (feedbackViewModel == null)
            {
                throw new ArgumentNullException(nameof(feedbackViewModel));
            }

            using (var repository = Factory.GetFeedbackRepository())
            {
                var feedback = repository.FirstOrDefault(f => f.TrackId == feedbackViewModel.TrackId && f.UserId == feedbackViewModel.UserDataId);

                if (feedback == null)
                {
                    if (!string.IsNullOrWhiteSpace(feedbackViewModel.Comments))
                    {
                        feedback = ModelsMapper.GetFeedback(feedbackViewModel);
                    }
                }
                else
                {
                    feedback.Comments = feedbackViewModel.Comments;
                }

                if (feedback != null)
                {
                    if (!string.IsNullOrWhiteSpace(feedback.Comments))
                    {
                        repository.AddOrUpdate(feedback);
                    }
                    else
                    {
                        repository.Delete(feedback);
                    }
                    repository.SaveChanges();
                }
            }

            if (feedbackViewModel.Mark > 0)
            {
                using (var repository = Factory.GetVoteRepository())
                {
                    var vote = repository.FirstOrDefault(v => v.TrackId == feedbackViewModel.TrackId && v.UserId == feedbackViewModel.UserDataId);

                    if (vote == null)
                    {
                        vote = ModelsMapper.GetVote(feedbackViewModel);
                    }
                    else
                    {
                        vote.Mark = feedbackViewModel.Mark;
                    }

                    repository.AddOrUpdate(vote);
                    repository.SaveChanges();
                }
            }
        }