public IHttpActionResult Get(string id, string contentType) { if (!_commentService.Any(x => x.Id == id)) { return(Content(HttpStatusCode.OK, "Comment with such id does not exist")); } var comment = _commentService.GetItemById(id); var model = _mapper.Map <Comment, CommentViewModel>(comment); return(Serialize(model, contentType)); }