Is the concept of dbContext in the Entity Framework world equivalent to the Bounded Context in the world of Domain Driven Design by Eric Evans? As Eric advises, a Bounded Context will have an aggregate root and a repository. Can I follow the same pattern with EF also if I have to use a repository pattern with the EF.
0
votes
1 Answers
0
votes
They are not entirely equal but you can definitely use a DbContext as a mapping to your domain repository for a Bounded Context. Strictly speaking a DbContext is a representation of a segment of a database, they can also technically share tables with other DbContexts (which isnt very DDD), but if you are following DDD you could represent the data for each bounded context using a DbContext.