public async Task <HttpResponseMessage> Post(Issue issue) { var newIssue = await _store.CreateAsync(issue); var response = Request.CreateResponse(HttpStatusCode.Created); response.Headers.Location = _linkFactory.Self(newIssue.Id).Href; return(response); }
public async Task <HttpResponseMessage> Post(dynamic newIssue) { var issue = new Issue { Title = newIssue.title, Description = newIssue.description }; await _store.CreateAsync(issue); var response = Request.CreateResponse(HttpStatusCode.Created); response.Headers.Location = _linkFactory.Self(issue.Id).Href; return(response); }