title: Is the .NET Web API BadRequest() method equivalent to Request.CreateErrorResponse(...)
body: <p>In our Web API at my company, we currently return our 400 error responses with the code:</p>
  
  <pre class="lang-cs prettyprint-override"><code>return request.CreateErrorResponse(HttpStatusCode.BadRequest, someErrorMessage);
  </code></pre>
  
  <p>However, in my personal projects with Web API and in some of the documentation, I have seen the much cleaner code for returning various status codes, such as:</p>
  
  <pre><code>return BadRequest(someErrorMessage);
  </code></pre>
  
  <p>What's the difference between these two methods of returning a 400 response? Which is preferred? Can we safely migrate from one variant to another without any difference in what the consumer of the API will see? We use Swagger, if that makes a difference.</p>