title: Why derive from ControllerBase vs Controller for ASP.NET Core Web API?
body: <p>I am following this tutorial for creating an ASP.NET Core Web API, and in the section on adding a controller, the tutorial gives code to replace the template code for a controller. One of the things that really caught my eye was that in the template code, I get:</p>
  
  <pre><code>TodoController : Controller
  </code></pre>
  
  <p>Then in the tutorial code I'm supposed to use instead of that, I find:</p>
  
  <pre><code>[Route("api/[controller]")]
  [ApiController]
  TodoController : ControllerBase
  </code></pre>
  
  <p>I'm very interested to know why it is necessary to derive from <code>ControllerBase</code> instead of <code>Controller</code> for a Web API controller. Why is this done?</p>