public IHttpActionResult AddComment(int id, CommentBindingModel model) { if (!ModelState.IsValid) { return(this.BadRequest(ModelState)); } var userId = RequestContext.Principal.Identity.GetUserId(); var allIssueComments = issuesService.AddComment(id, userId, model); return(CreatedAtRoute("GetIssueComments", new { id = id }, allIssueComments)); }