cover

Arch tests - Check project references

In our company we have a large solution which contains more than 100 projects (not including test projects). Within that solution are WebAPI projects, libraries and AZURE functions. A couple...

Own mediator

Currently, the Mediator design pattern is often used. Its purpose is to separate the communication between objects from each other. Which will reduce dependencies between classes, make the code more...

Ocelot ETag Caching

The Kros.Ocelot.ETagCaching library brings ETag caching support to the Ocelot API Gateway. ETag caching is an HTTP caching mechanism that allows clients to verify if the cached data is still...

ASP.NET CORE Minimal API - Content Negotiation

The primary goal of ASP.NET Core Minimal API is to deliver a straightforward, simple, and most importantly, very powerful framework for creating APIs. Rather than delivering features to cover every...

How to use IHostedService to initialize an application

ℹ️ This is another article in a series showing how you can use IHostedService. ASP.NET Core - Periodic Background Task. ASP.NET Core - Queued hosted service. You may find that...

ASP.NET Core - Queued hosted service

ℹ️ This is a follow-up to ASP.NET Core - Periodic Background Task. There are situations when you do not want to process a longer-running action directly during request processing, but...

ASP.NET Core - Periodic Background Task

You may have had a need in your services to run some task that will run periodically in the background (cache updates, data synchronization, deleting old data, etc.). In new...

HttpContext Request Features

In ASP.NET Core, we are used to working with dependency injection and we tend to pass most of the information through dependency injection to the classes where we need it....

Throw vs. Throw ex - Back to the basics

This is another article in the “Back to the basics” series. The first part covered Boxing and UnBoxing, today we’ll look at the difference between throw and throw ex. 💁...

Approval test for your public API

Are you developing a .NET library and want to make sure that the public API of your library is always consistent and versioned correctly? How do you check that changes...

ASP.NET Core - Rate limiting

Rate limiting is a technique used mainly with APIs to control and limit the number of requests that clients can make to the API in a defined time. It belongs...

AZURE Service Bus - How we didn’t use Topic filters

When developing microservices, you are likely to encounter the need for a message broker. A reliable system for sending messages between services. We at KROS a.s. have decided to use...

C# 12 news that didn’t make it into separate posts

C# 12 has been released November 2023. I’ve written separate articles about each of the new features: C# 12 - Primary constructor C# 12 - Collection expressions Simplify tuple types...

Testing with properties using FsCheck

I assume that most of us use a technique called example-based testing when writing unit tests. This technique is based on writing tests that verify the behavior of our functions...

Boxing & UnBoxing - Back to the basics

Unless you know what Boxing and UnBoxing (no UnBoxing is not fancy unboxing a new iPhone by your favorite youtuber) is, don’t read this post. In all likelihood, you won’t...