title: Ok() doesn't exist in current context unless async is used
body: <p>I'm not sure why this is happening but in the code I am showing below, it is saying that 'Ok' doesn't exist in this current context but when I add async to the code, the error goes away and it works again. I dont put an await or anything, it's just the async. The working one gives a warning, like it should but for some reason it is making it work, does anyone know why, and how do I fix this?</p>
  
  <p>Not working:</p>
  
  <pre><code>    public Task&lt;IActionResult&gt; GetBusinesses()
      {
          var events = _context.Businesses.Include(p =&gt; p.Locations).ToList();
  
          return Ok(events);
      }
  </code></pre>
  
  <p>Working:</p>
  
  <pre><code>    public async Task&lt;IActionResult&gt; GetBusinesses()
      {
          var events = _context.Businesses.Include(p =&gt; p.Locations).ToList();
  
          return Ok(events);
      }
  </code></pre>