~/talk

Mapping DDD Domain Models with EF Core 2.1

slides:none on file

EF Core 2.1 maps rich DDD patterns so domain classes persist without a separate data model: it recognizes private backing fields and encapsulated collections (IEnumerable + private field) via SetPropertyAccessMode/HasField, maps value objects with OwnsOne, converts custom types with HasConversion, and lets the DbContext supply audit columns using shadow properties and an overridden SaveChanges. Demo code includes constructor injection, integration tests and model validation, notes lack of owned collections (owns many deferred to 3.0) and many-to-many still needs explicit join entities.

AI-written summary · about

  1. 0:00Introduction to EF and DDD
  2. 2:35Bridging DDD and EF
  3. 5:03Tactical DDD Design
  4. 8:03EF Core as a Mapper
  5. 10:40EF Core Updates
  6. 12:22Domain Model Overview
  7. 14:26DDD Principles and Testing
  8. 17:55Encapsulating Properties
  9. 22:54Protecting Collections
  10. 28:55Mapping Value Objects
  11. 43:44One-to-One Relationships
  12. 49:23Value Conversions
  13. 51:42Shadow Properties and Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.