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

            return(Ok(
                       feedbackDateResponse.Adapt <FeedbackDateResponse>()
                       ));
        }
Ejemplo n.º 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
                       ));
        }