1. Maybe it’s time to rethink our project structure with .NET 6

With the upcoming release of .NET 6, we’re also getting a new API to build applications. This new API is called the “Minimal Web API”.

https://timdeschryver.dev/blog/maybe-its-time-to-rethink-our-project-structure-with-dot-net-6#an-api-with-controllers

2. Use C# 9 records and init-only properties in ReSharper and Rider 2020.3

C# 9 has brought us init-only properties and records, allowing us to work with types similarly to functional languages. Let’s take a look at some new C# 9 features.
https://blog.jetbrains.com/dotnet/2020/12/07/use-c-9-records-and-init-only-properties-in-resharper-and-rider-2020-3/

3. Migration to ASP.NET Core in .NET 6

.NET 6 introduces a new hosting model for ASP.NET Core applications. This model is streamlined and reduces the amount of boilerplate code required to get a basic ASP.NET Core application up and running.

4. From MVC to Minimal APIs with ASP.NET Core 6.0

This post provides a step-by-step guide on how to translate traditional MVC concepts to this new way of building lightweight HTTP APIs and services.
https://benfoster.io/blog/mvc-to-minimal-apis-aspnet-6/

5. Avoid using Task.Run for long running work that blocks the thread

Stealing a thread-pool thread for long-running work is bad since it takes that thread away from other work that could be done (timer callbacks, task continuations etc). Instead, spawn a new thread manually to do long running blocking work.
https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/blob/master/AsyncGuidance.md#avoid-using-taskrun-for-long-running-work-that-blocks-the-thread

Bekijk ook alle andere must reads.