Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Angular BFF and Aggregation with YARP: Running Proxy Routes Side by Side with Your Own Endpoints
Because YARP routes are normal endpoints, you can serve Angular files, aggregation endpoints and proxy routes from one app on a single origin without CORS; the parts to watch are fallbacks, the timeout budget and second traffic paths. With real output from Bookstore we show a book page endpoint that calls Catalog, Inventory and Ordering in parallel, partial failure, an HttpClient that uses YARP's health data, and an IHttpForwarder that picks a target per institution.
LINQ Aggregation Operators: Count, Sum, Average, Min, Max, Aggregate and MinBy/MaxBy
Why Sum returns 0 and Max throws on an empty sequence, and the nullable selector and DefaultIfEmpty fixes. Count and .NET 6 TryGetNonEnumeratedCount, the return type of Average, the checked overflow of Sum, MinBy/MaxBy returning the element instead of the value, the three overloads of Aggregate, and how many times you enumerate the same query.