Base solution for your next web application
Open Closed

Question about Bounded Context in AspnetZero App #10947


User avatar
0
cangunaydin created

Hello, I have a question about how to share the same concept in different bounded context. below image is not from my app but sth i can refer to point out my problem.

As you can see in the image, client has different purpose in different contexts. In this case on "Billing BC" and "Scheduling BC". Scheduling BC doesn't need the information about credit cards and etc. To schedule the client you don't need those information. In these kind of cases to not break the ddd rules what is the best approach to get the data into different context. Let's say i want to schedule the client. How should i get the client data? From a different bounded context? I have read that some people are suggesting to duplicate the data between different bcs but i do not know if it is the best approach since i am working on single db. here is a stackoverflow question about it. https://stackoverflow.com/questions/66663259/domain-driven-design-how-to-connect-two-contexts and the second option in this answer can be done (Reuse of persistence object (db tables) in several contexts). Then my question turns into how i should organize this in anz project since it is shared between different contexts.

Should i create 3 folders in core project like. SharedAggregate * Client Aggregate Scheduling * Schedule Aggregate Billings * Billing Aggregate

to point out client is shared with different contexts? Do you have any suggestions for this?


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @cangunaydin

    This seems like a common question rather than an AspNet Zero related question. Maybe someone else will provide a suggestion. I'm keeping this issue open for a while.

  • User Avatar
    0
    cangunaydin created

    Hello @ismcagdas, I don't think someone will reply a solution for this. I know that there is no one right solution for this problem, but i was thinking maybe you come up with sth similar in the community or support. Should i raise the same question on abp commercial support instead? Since I use abp on another project and ddd is more focused on that framework?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @cangunaydin

    I'm not sure but you can try that. They might provide an answer.