Creating new IHttpActionResult action result methods
问题 Is there a way I can use the new IHttpActionResult interface to return a HttpStatusCode.NoContent response message? I am currently using return new HttpResponseMessage( HttpStatusCode.NoContent ); and would like to convert this into return NoContent(); . IHttpActionResult has already got Ok() , Conflict() and NotFound() but I cannot find any for Forbidden() and NoContent() which I need to use in my project. How easy is it to add other result types? 回答1: There's no convenience method for no