예제 #1
0
        public ActionResult <List <FeedbackOutputModel> > GetFeedbacksByTestId(int testId)
        {
            Mapper           mapper    = new Mapper();
            AuthorDataAccess feedbacks = new AuthorDataAccess();
            var test = feedbacks.GetTestById(testId);

            if (test == null)
            {
                return(BadRequest("Теста не существует"));
            }
            return(Ok(mapper.ConvertFeedbackDTOToFeedbackModelList(feedbacks.GetFeedbacksByTestId(testId))));
        }