Josef Ottosson

Freelancing Developer · Microsoft MVP

Subscribe via RSS
© Josef Ottosson 2025
dotnet

IDistributedCache (Redis) - remove by prefix

Implementing prefix-based cache invalidation in Redis using a dotnet core, a custom IDistributedCache implementation and some Lua scripting.

a month ago November 25th, 2025 3 min read
dotnet core

Compress HttpClient requests with GZIP

By streaming the gzip compression instead of using MemoryStream, we can significantly reduce memory allocation and avoid OutOfMemoryExceptions with large payloads.

3 months ago September 12th, 2025 3 min read
dotnet

Read only properties on Domain object using Entity Framework Core

Storing immutable domain objects directly with Entity Framework Core using value converters and private backing fields to handle read-only collections and custom types.

5 months ago August 7th, 2025 5 min read
asp.net core

JOS.Enumeration - Minimal API support

Binding enumerations in ASP.NET Core Minimal APIs using TryParse and BindAsync methods for parameter binding.

5 months ago July 19th, 2025 2 min read
tips and tricks

Don't reinvent the wheel - configuration

Avoid creating custom environment helpers - use the built-in functionality instead.

7 months ago June 7th, 2025 2 min read
Subscribe via RSS
© Josef Ottosson 2025