Library topic

ASP.NET Core

Web APIs, Blazor, middleware, authentication and hosting. 69 links, all featured in The .NET Insider.

50 practical improvements for projects staying on .NET 10

Mukesh Murugan · codewithmukesh.comIssue 37

Works well as a code-review companion: follow a list endpoint from HTTP to SQL and check that it passes the cancellation token, selects only the columns in the response and paginates the result. Also covers startup validation for configuration, consistent API errors with ProblemDetails and named EF Core query filters, most small enough for the next pull request.

What .NET 11 changes for controllers and Minimal APIs

David Grace · roundthecode.comIssue 35

Demonstrates controller short-circuiting and union response types, then uses an email lookup to explore asynchronous validation in Minimal APIs. The examples show where the new features fit in an existing API. One boundary to note: the asynchronous validation example works in Minimal APIs, while his controller example still invokes synchronous validation, so check the behavior for the endpoint style you use.

Add Amazon S3 file storage to an ASP.NET Core API

Nikola Knezevic · nikolatech.netIssue 34

Upload, download and delete operations with the AWS SDK, strongly typed options and Minimal APIs. A small storage service keeps S3-specific requests out of the endpoints, and object metadata preserves the original filename for downloads. A starting point for files that must be available across instances; presigned URLs and multipart uploads are not covered.

Use C# unions and closed hierarchies in ASP.NET Core

Dmitrii Korolev · .NET BlogIssue 29

How unions and closed hierarchies behave in Minimal APIs, MVC, SignalR, Blazor and OpenAPI, all through System.Text.Json. Unions serialize as the active case with no discriminator, so cases with the same JSON shape need a classifier. Not supported for route, query, header or form binding. For new contracts you control, the post recommends a closed hierarchy with a discriminator.

Links go to the original articles. Short descriptions are dotnetdevs.io commentary, not the authors' words.