I might be missing something, but I personally find the following approach more elegant and informative.
[HttpPut] public IHttpActionResult Approve(long id) { if (!ModelState.IsValid) { return BadRequest(); }
Instead of having a controller that returns no data, I would return “something like” “OK” (true) depending on the success or failure of the operation.
Mhoos source share