public async Task <FeedbackDto> CreateFeedbackAsync(FeedbackDto feedbackDto) { Feedback feedback = feedbackDto.ToEntity(); feedback.Date = DateTime.Now; Feedback created = await _repository.AddFeedbackAsync(feedback); if (created == null) { throw new Exception("Feedback already exists."); } return(new FeedbackDto(created)); }