NotFoundResult represents an HTTP 404 Not Found response when the requested resource does not exist. It sends a raw status code through the middleware pipeline without generating HTML. section 15.4.2
Returning 404 from an API action
A controller can return the requested item when an ID is valid and return NotFound() otherwise: `public ActionResult<string> View(int id) { if (id >= 0 && id < _fruit.Count) return _fruit[id]; return NotFound(); }` With [ApiController], the 404 response is converted into the standard ProblemDetails format. section 20.1
Figure 15.4 If you return a raw 404 status code without any HTML, the browser will render a generic default page instead. The message is of limited utility to users and may leave many of them confused or thinking that your web application is broken.
A raw 404 contains no HTML, so a browser may display a generic default page with little useful guidance. section 15.4.2
Raw status codes suit APIs, but Razor Pages applications usually need an intercepted 404 response with a user-friendly HTML page. section 15.4.2
