Some extensions are already implemented in latest EF Core version but it can be useful for those stuck with old versions, I know something about it.
In a close domain, DapperLib/DapperAOT can also be very usefull. It’s a source generator that handle the heavy task of checking the SQL syntax before generating the Dapper code from attributes, all in AOT mode.
A very simple way to delete entities in EF Core without preliminarily getting that entity. If we know its primary key, there is no need to do a get request, we just have to inform EF that the object is supposed to exist and deal with the case where it doesn’t exist. It’s obvious but very little used
making it a solution for all needs (It’s use is not restricted to http requests handling). The aforementioned article shows how to use it in DelegatingHandler to limit outgoing http requests but it an edge case.
Main use is obviously for processing incoming http requests. For this usage, a .Net 7.0 Microsoft.AspNetCore.RateLimiting package is also provided by Microsoft. It’s mainly a rate limiting middleware hiden behind policies. Policies are named configurations of rate limiters usable in http pipeline branches.
The design of the API seems extensible and clean, it will have to be seen in use. The only regret is that Middleware is only available for .Net 7, a non-LTS release.
This project has evolved to take into account the new memory efficiency paradigms integrated into the latest versions of .Net Core (Span, ReadOnlySpan, ReadOnlySequence, and Memory). It is more useful than ever to reconcile throughput and CPU load.