title: Postman getting 404 error for simple ASP.NET Core Web API
body: <p>I have set up a very simple ASP.NET Core 2.1 Web API project, and have created to following simple controller that fetches entites using EF Core. </p>
  
  <p>The problem is that when trying to access the GetEntities method using Postman, the response is a 404 error. I used an HTTP GET method on the following URL.</p>
  
  <p><code>https://localhost:44311/api/entities</code></p>
  
  <p>The response body contains the message <code>&lt;pre&gt;Cannot GET /api/entities&lt;/pre&gt;</code>.</p>
  
  <p>Why is Postman receiving a 404 error for this route?</p>
  
  <p><strong>EntitiesController.cs</strong></p>
  
  <pre><code>namespace MyProject.Controllers
  {
      [Route("api/controller")]
      public class EntitiesController : Controller
      {
          private readonly ApplicationDbContext dbContext;
  
          public EntitiesController(ApplicationDbContext _dbContext)
          {
              this.dbContext = _dbContext;
          }
  
          [HttpGet]
          public IActionResult GetEntities()
          {
              var result = dbContext.Entities.ToListAsync();
              return Ok(result);
          }
      }
  }
  </code></pre>