/// <summary> /// Update an existing checkout object with a specified item_id, member_id, and item_type /// </summary> /// <param name="member_id">The id of the member that checked out the item</param> /// <param name="item_id">The id of the item that was checked out</param> /// <param name="item_type">The type of item that was checked out [book|dvd|technology]</param> public HttpResponseMessage Put(int item_id, int member_id, String item_type, [FromBody] Checkout value) { CheckoutPersistence checkp = new CheckoutPersistence(); checkp.addCallField("item_id", item_id, System.Data.SqlDbType.Int, 4); checkp.addCallField("member_id", member_id, System.Data.SqlDbType.Int, 4); checkp.addCallField("item_type", item_type, System.Data.SqlDbType.VarChar, 50); bool recordExisted = checkp.Update(value); HttpResponseMessage response; if (recordExisted) { response = Request.CreateResponse(HttpStatusCode.NoContent); } else { response = Request.CreateResponse(HttpStatusCode.NotFound); } return(response); }