Blog Logo
TAGS

EF configurations are sick! (and work great with DDD)

Entity Framework has established itself as a mature product that can be used to solve any problem. Despite that, not many developers have been using it effectively. Even though, it works perfectly for small projects, when stuff gets more complicated developers just refuse of using it. I have seen multiple unsuccessful attempts to collaborate DDD and EF. Some of those are so desperate, that developers would just avoid EF’s features and create separate models for Domain and Data Access layers, with additional mapping logic in between. Stay with me if you want to know how to get rid of code duplication and configure complex mapping from your DDD model to Database. We will briefly review next topics: Global query filters, Owned Entity Types, Backing Fields, Excluded Properties, Shadow Properties, Value Conversions. If you are ready, let’s begin. This JSON structure has a title field consisting of the summarized title of the text and a summary field containing the summarized version of the text.