views:

40

answers:

1

Hi, I'm new to DDD. I have an existing ASP.NET application (not MVC) and I would like to start implementing a domain driven design.
However, I'm not sure where I should call the repository from. For example if I had a customer repository with a Save method, my understanding is that I should not call the Save method from the customer entity. I thought about using a service but then my understanding is that a service should be used to co-ordinate actions e.g. money transfer seems to be a common example. So do I call the repository class in the page code-behind or do I create another layer or am I missing something?

Thanks in advance.

+1  A: 

Keep it simple, don't overdesign.

Start with calling it directly from the CodeBehind. If you find yourself calling different repositories in the future, create a service and move the logic to it.

jgauffin
Thanks for the replay jgauffin.
Tigger
Please accept the answer (click on the checkbox) if you like the answer.
jgauffin