say you have a repository BusinessRepository and you want to have some method that deletes a given BusinessContact, in this scenario Business is the parent and BusinessContact is the child, one to many, each business can have many contacts, would we have two deletes method in same repository? or put it in the Update method. I am using C# and EF 4. Thankx
Asked
Active
Viewed 176 times
1 Answers
0
Sounds like Business is an aggregate root.
So, i would suggest Adding and deleting contacts through methods on your Business entity which you get using your repository.
Info on Repository Pattern and aggregate roots: What's an Aggregate Root?