May 18, 2020

Binding and Validating Enums in ASP.NET Core

We commonly use C# Enumeration types to represent a set of named constants within our applications. Often the values for such properties comes from the user via an API request but unfortunately the default model-binding and validation behavior in ASP.NET Core does provide the desired API experience. This post looks at how we handle binding and validating enum values in our APIs as well as supporting snake_case variants of the enum member names.

April 13, 2020

Serilog Best Practices

Serilog is a structured logging library for Microsoft .NET and has become the preferred logging library for .NET at Checkout.com.. It supports a variety of logging destinations, referred to as Sinks, from standard console and files based sinks to logging services such as Datadog. This guide started off as an article in our engineering handbook and after receiving positive feedback internally, I decided to release it on my blog. Read more

© 2022 Ben Foster