~/talk

Practical Domain-Driven Design with EF Core

Talkat NDC London 2021 · 2021-01-25..01-29· [databases]
links:none on file
slides:none on file

Refactors a legacy .NET 5 API using EF Core 5 and MediatR to turn an anemic model into a rich domain: parameterized constructors with private EF ctor enforce invariants, behavior moves into entities (customer.AddSubscription, product.CalculateExpiry), and cross-entity logic becomes a domain service. Tests run as refactors happen and integration tests pass after changes. Domain events publish via a SaveChanges interceptor to MediatR, value objects map with owned types, and patterns shown include specification/extension queries and strongly typed entity IDs.

AI-written summary · about

  1. 0:00Intro
  2. 1:14What is Domain-Driven Design?
  3. 1:38What is Domain Model? An object model of the domain that incorporates both behavior and data.' - Martin Fowler
  4. 2:44Bounded Contexts • A defined part of software where particular terms, definitions and rules apply in a consistent way Clear boundaries between different parts of the system
  5. 4:01Inside the Core Domain
  6. 5:49Sample Domain
  7. 20:56Extract Methods
  8. 21:16Avoid Public Setters
  9. 21:40Encapsulate Behavior in Domain Model
  10. 32:39Encapsulate Behavior in Domain Service
  11. 32:51Double Dispatch
  12. 42:03Domain Events
  13. 46:42From Primitive Obsession to Value Objects
  14. 47:50Where is the Repository?
  15. 48:55Can the Unit of Work help us?
  16. 49:24Embrace the DbContext
  17. 50:31Specification: Current Query
  18. 51:28Specification: Base Classes
  19. 51:53Specification: Concrete Sample
  20. 53:12Specification: Extension Methods
  21. 53:56Base Entity ID
~/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.