Beispiel #1
0
        public async Task <IActionResult> UpsertFeedbackDate(FeedbackDateResponse model)
        {
            FeedbackDateModel feedbackDateResponse =
                await _feedbackService.UpsertFeedbackDate(model.Adapt <FeedbackDateModel>());

            return(Ok(
                       feedbackDateResponse.Adapt <FeedbackDateResponse>()
                       ));
        }
Beispiel #2
0
        public async Task <FeedbackDateModel> UpsertFeedbackDate(FeedbackDateModel feedbackDate)
        {
            FeedbackDate feedbackDateRequest = feedbackDate.Adapt <FeedbackDate>();

            int feedbackDateResponseId = await _feedbackRepository.UpsertFeedbackDates(feedbackDateRequest);

            return(new FeedbackDateModel(
                       (feedbackDateResponseId != 0) ? feedbackDateResponseId : feedbackDate.Id,
                       feedbackDate.LabId,
                       feedbackDate.Date
                       ));
        }