public async Task <IActionResult> UpsertFeedbackDate(FeedbackDateResponse model) { FeedbackDateModel feedbackDateResponse = await _feedbackService.UpsertFeedbackDate(model.Adapt <FeedbackDateModel>()); return(Ok( feedbackDateResponse.Adapt <FeedbackDateResponse>() )); }
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 )); }