Find out how to create custom middleware using C# and add it to a .NET app by adding HTTP response headers to an ASP.NET Core Web API request.
Exception handling in C# has improved dramatically with the launch of it's own IExceptionHandler middleware in .NET 8 .
.NET 8 allows for a faster way to validate the option values in appsettings.json in an ASP.NET Core Web API using data annotations.
The worker service project sees a major update in .NET 8 with the new IHostedLifecycle interface hooking into new background hosted service lifecycles.
Model validation for ASP.NET Core Web API now includes data annotations such as allowed and denied values as well as Base64 string validation.
The TimeProvider abstract class can be used in xUnit unit tests to mock the time and a timer using the FakeTimeProvider in .NET 8.
Collection expressions (also known as collection literals) brings the spread operator to C# allowing for collection types to be joined together.
Blazor has a .NET 8 render mode feature that allows different modes to be set for Razor components in the same app whether it's Server, WebAssembly or Auto.
Server-side rendering (SSR) is a render mode which has become a new Blazor feature for .NET 8, working in a similar way to ASP.NET Core MVC.
Primary constructors is a C# 12 feature that allows to add parameters to a class and includes dependency injection support.