// POST api/review public HttpResponseMessage Post(Comment comment) { var response = Request.CreateResponse(HttpStatusCode.Created, comment); response.Headers.Location = new Uri(Request.RequestUri, string.Format("reviews/{0}", comment.Id)); _commentsRepository.Add(comment); return response; }
// PUT api/review/5 public void Put(Comment comment) { _commentsRepository.Update(comment); }