// PUT api/<controller>/5 public IHttpActionResult Put(int id, [FromBody] string value, [FromUri] ApiActionQueryOptions options) { ActionContext.ResolveActionExecutionContext(options, _executionContext); var response = _valuesService.UpdateItem(id, value); return(GenerateActionResult(response)); }
// DELETE api/<controller>/5 public IHttpActionResult Delete(int id, [FromUri] ApiActionQueryOptions options) { ActionContext.ResolveActionExecutionContext(options, _executionContext); var response = _valuesService.RemoveItemById(id); return(GenerateActionResult(response)); }
// GET api/<controller> public IHttpActionResult Get([FromUri] ApiActionQueryOptions options) { ActionContext.ResolveActionExecutionContext(options, _executionContext); var response = _valuesService.GetAllItems(); return(GenerateActionResult(response)); }