Here Mudassar Khan has explained with an example, how to return HTTP Status Code from Web API in ASP.Net Core.
This article will cover the in-built HTTP Status Codes i.e., 200, 201, 204, 400, 401, 403 and 404 as well as the ones for which there is no in-built function in ASP.Net Core.