コード例 #1
0
        public bool ApproveFeedback(Guid id)
        {
            try
            {
                Feedback      feedback      = _feedbackRepository.GetById(id);
                FeedbackEvent feedbackEvent = new FeedbackEvent(FeedbackEventType.APPROVED, feedback.Id);

                feedback.Approve();
                _feedbackRepository.Update(feedback);
                _eventRepository.Create(feedbackEvent);

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }