Пример #1
0
        public IActionResult Get(long id)
        {
            var response = _repository.Find(id);

            if (response == null)
            {
                return(NotFound());
            }
            return(new ObjectResult(response));
        }
Пример #2
0
        public async Task <Response[]> Get(string commentId)
        {
            Response[] responses = await _responseRepository.Find(x => x.CommentId == commentId);

            foreach (Response response in responses)
            {
                await UpdateResponseWithLikesAndDislikes(response);
            }

            return(responses);
        }