public IActionResult Get(long id) { var response = _repository.Find(id); if (response == null) { return(NotFound()); } return(new ObjectResult(response)); }
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); }