Mar 08, 2022

Why I "hate" optional parameters in C#

Let me start by saying that the title of this post is a little exaggerated in regards to how I feel about optional parameters. “Hate” is a strong word and I certainly don’t mean that optional parameters are a useless feature or that it is a bad practice to use them. It’s just that, I’ve rarely seen them used correctly and in almost all cases I see them being used, they bring more problems than solutions. After many long and painful debugging sessions, the sight of... more

Jan 16, 2022

EF Core: Effectively decouple the data and domain model

IntroductionThis is a continuation of my first post Implementing a Clean Architecture in ASP.NET Core 6, and describes the method I’ve used to achieve clear separation of data models and domain models. In this post, I’ll be expressing my views on the clear separation of persistence related models and business models and look into how we can effectively decouple the data and domain model when using EF Core.First, domain model. Second, data model.Over the last few EF Core iterations,... more

Nov 08, 2021

Designing the domain model to support multiple persistence methods

IntroductionThis is a continuation of my earlier post Implementing a Clean Architecture in ASP.NET Core 6, so if you haven’t read that yet, I suggest you do as it will provide a little more context, although it is not necessary to follow along.As mentioned in the previous post, I wanted to allow the use of a traditional state-oriented CRUD model for persistence, and at the same time have the ability to switch to an event sourcing method, or even use both side-by-side. So in this post,... more

Image

Oct 29, 2021

Implementing a Clean Architecture in ASP.NET Core 6
POPULAR
Implementing a Clean Architecture in ASP.NET Core 6
Image
Designing the domain model to support multiple persistence methods
EF Core: Effectively decouple the data and domain model
Why I "hate" optional parameters in C#