MapControllers exposes attribute-routed web API controller actions as endpoints. It lets routing match incoming URLs to action methods, while each action can receive requests and return an HTTP response. section 20.1
Mapping a simple API controller
A web API template registers controllers with AddControllers(), then calls app.MapControllers(). A FruitController action marked [HttpGet("fruit")] responds to GET /fruit, returning its string collection as JSON.
