public bool PutTeam(Team team) { if (!databasePlaceholder.Update(team)) { throw new HttpResponseException(HttpStatusCode.NotFound); } return true; }
public HttpResponseMessage PostTeam(Team team) { team = databasePlaceholder.Add(team); string apiName = WebApiConfig.DEFAULT_ROUTE_NAME; var response = this.Request.CreateResponse<Team>(HttpStatusCode.Created, team); string uri = Url.Link(apiName, new { id = team.id, controller = "team" }); response.Headers.Location = new Uri(uri); return response; }