title: API only returns responses with no content
body: <p>My methods only return responses with no content.</p>
  
  <p>Controller</p>
  
  <pre><code>[HttpGet("Floors/{floorId}", Name = "FloorById")]
  public IActionResult GetFloor(int floorId)
  {
      try
      {
          Floor floor = _repository.Floor.GetFloor(floorId);
          if (floor == null)
              return NotFound();
          return Ok(floor);
      }
      catch (Exception e)
      {
          return StatusCode(500, "text");
      }
  }
  </code></pre>
  
  <p>Repository</p>
  
  <pre><code>public Floor GetFloor(int floorId)
  {
      return _context.Floors.FirstOrDefault(f =&gt; f.Id == floorId);
  }
  </code></pre>
  
  <p>Ideally, this code should return an Ok response with the object as well. </p>
  
  <p>Instead, I only get an Ok response when using swagger. Not even the NotFound.</p>