Josef Ottosson

Freelancing Developer ยท Microsoft MVP

Subscribe via RSS
© Josef Ottosson 2026

c-sharp

A collection of 35 posts

c-sharp

System.Text.Json and immutable types - Deserialization

This post shows how to serialize and deserialize immutable C# domain objects without using any attributes.

a year ago December 13th, 2024 7 min read
asp.net core

Don't let ASP.NET Core set empty strings to null when posting forms

This post highlights how ASP.NET Core converts empty strings to null in form submissions and demonstrates how to prevent this behavior.

2 years ago November 28th, 2024 2 min read
c-sharp

Use the implicit operator to reduce noise in your code

This post demonstrates how to simplify cache key handling in C# by using typed objects and the implicit conversion operator, allowing automatic string conversion without manual method calls.

2 years ago September 18th, 2024 1 min read
dotnet

EF Core - Add a test to ensure that you don't forget to add new migrations

Add a test that reminds you to create migrations (if you've forgotten).

3 years ago July 14th, 2023 2 min read
jos.enumeration

JOS.Enumeration - System.Text.Json support

Custom JsonConverter that only writes the integer value of our Enumeration class. It also supports deserialization by only supplying the Enumeration value.

3 years ago May 29th, 2023 3 min read
Subscribe via RSS
© Josef Ottosson 2026