liveBook · Manning

ASP.NET Core

As explained in Building Web APIs with ASP.NET Core

ASP.NET Core is Microsoft's open-source, cross-platform framework for building web applications and web APIs on .NET.

ASP.NET Core is Microsoft's high-performance, open-source, cross-platform framework for building web applications and web APIs. A web API lets clients access and update data through an HTTP-based service; ASP.NET Core supplies the components for building that service. section 1.2 section 1.0

An ASP.NET Core application is assembled from reusable services and middleware. Services provide functionality and can be supplied to other components through dependency injection. Middleware handles the HTTP request pipeline. In the .NET 6 minimal hosting model, both are registered and configured in Program.cs, the application's entry point. section 1.2.1 section 1.3

For a board-game API, a practical starting path is:

  • Install the .NET SDK and required runtimes, unless the chosen IDE installs them; then create a project with Visual Studio's ASP.NET Core web API template. section 2.6
  • Inspect Program.cs for setup, appsettings.json for configuration, and launchSettings.json for development-server settings. section 2.6
  • Replace the template's weather-forecast data class and controller with board-game-related classes. Controllers are one API-building option; minimal APIs offer a simpler, lower-overhead alternative for straightforward APIs. section 2.6 section 1.3

The framework also supports concerns beyond the first endpoint. Built-in services and middleware can configure CORS; response headers can control caching; response DTOs can include links and metadata. Swashbuckle can generate and customize OpenAPI documentation. These choices help turn a working endpoint into an API that clients can access, navigate, and understand. section 3.5 section 11.5

How Building Web APIs with ASP.NET Core covers it

How deep it goes
Explains component roles and Program.cs configuration, then identifies template files and API options; detailed implementation is not present in these excerpts.
Examples
Uses Visual Studio's web API template, its weather-forecast sample, and replacement board-game classes.
What it assumes
Starts with web API basics and calls for a .NET SDK, required runtimes, and a suitable IDE.
What you can do after
Apply it via Visual Studio's ASP.NET Core web API template to start a board-game API and identify its configuration points.
How it connects
Connects dependency injection, middleware, HTTP request pipelines, controllers, minimal APIs, REST, and OpenAPI documentation.

Also explained in

Compare how 3 books explain ASP.NET Core →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Web APIs with ASP.NET Core. The section links point to the parts of the book it draws on.