dotnet-architecture / eShopOnContainers

Cross-platform .NET sample microservices and container based application that runs on Linux Windows and macOS. Powered by .NET 7, Docker Containers and Azure Kubernetes Services. Supports Visual Studio, VS for Mac and CLI based environments with Docker CLI, dotnet CLI, VS Code or any other code editor. Moved to https://github.com/dotnet/eShop.
https://dot.net/architecture
24.55k stars 10.36k forks source link

[Question] ClientRequest - Idempotency #1766

Closed ivanekel closed 2 years ago

ivanekel commented 2 years ago

Hi everyone. I have a question about domain models in Ordering project. Mainly on ClientRequest.cs. Depending on Clean architecture / DDD concepts domain entities must live in the domain layer image

so what is the goal of placing ClientRequest.cs in the Infrastructure layer which is also part of OrderingContext and not in the Domain layer?

nhdinh commented 2 years ago

@ivanekel in DDD, the term Bounded Context or in architectural term, Domain Layer, both refer to all the entities that are in the business workflow, herein is the Ordering. In this business workflow, the entities are the Order, OrderItem and Address..., those are the things that contains data in real life as well. In the other side, OrderingContext and ClientRequest are the helpers (or can be called Infrastructure) that helps Domain layer working with things outside boundary. Therefore, I see no wrong putting OrderingContext and ClientRequest out of Domain Layer.

erjain commented 2 years ago

Thanks for the clarification @ivanekel. Considering that the original question has been answered, I am closing this issue as of now. Please feel free to reopen if needed. Thank you.

erjain commented 2 years ago

Thanks for the clarification @ivanekel. Considering that the original question has been answered, I am closing this issue as of now. Please feel free to reopen if needed. Thank you.