How to rewrite BadRequest and Ok in .net web api?

mc
1,921
Reputation points
How to rewrite
Ok
and BadRequest
I can custom the return object?
if I return Ok(myObj)
I want to add some property to myObj and If I return BadRequest
I want to change the statusCode