Always-Valid Domain Model

I’m working on a new Pluralsight course on the topic of validation and DDD, with the help of the FluentValidation library and .NET data annotations (attributes). So expect a couple of posts about validation in the near future.

How to handle unique constraint violations

Today, we’ll discuss how to best handle unique constraint violations.

C# 9 Records as DDD Value Objects

Today, we’ll talk about the new C# 9 feature, Records, and whether or not they can be used as DDD value objects.

Domain model purity and lazy loading

This is the final article in the domain model purity series, where we’ll discuss this subject in the context of lazy loading.

Domain model purity and the current time

I’m continuing the topic of domain model purity. This time, we’ll discuss it with regards to getting the current date and time.

Domain model purity vs. domain model completeness

I’ve been meaning to write this article for a long time and, finally, here it is: the topic of domain model purity versus domain model completeness.

Is Equality Comparison a Code Pollution?

This post is about where to put the equality comparison logic: under the test or production code.

How to Unit Test an Abstract Class

How to unit test an abstract class? Or a whole class hierarchy that depends on that abstract class? Let’s see.

DRY vs DAMP in Unit Tests

In this post, we’ll make a deep dive into the DRY and DAMP principles and will talk about the false dichotomy around them.

How to Strengthen Requirements for Pre-existing Data

Need to change validation rules but have pre-existing data that doesn’t follow the new rules? In this post, we’ll talk about how to do that properly.