You can return the http status code along with the response object using:
return Ok(responseObject);
return BadRequest(responseObject);
return NotFound(responseObject);
But what about you want to return your own custom http status code? 402, 429, 500, 501 etc
Ok,BadRequestetc implement some interface that you can also implement in a userland class and return an instance of that class?Self-Learnerbadge