title: IHttpActionResult NotFound() not working
body: <p>I created a test web service using ApiController. Everything is working fine, but my NotFound() is not returning 404 not found in the browser or postman. It returns nothing.</p>
  
  <pre><code>[RoutePrefix("api/Test")]
  public class TestController : ApiController
  {
      private myEntity db = new myEntity();
  
      [HttpGet]
      [Route("{id:int}")]
      public IHttpActionResult GetById(int id)
      {
          // Get Customer by id
          Customer customer = db.Customers.Where(x =&gt; x.Id == id).FirstOrDefault();
  
          if (customer == null)
          {
              return NotFound();
          } else
          {
              return Ok(customer);
          }
  
      }
  
  }
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>The console log displays:</p>
  
  <blockquote>
    <p>The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature.</p>
  </blockquote>