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.58k stars 10.36k forks source link

Validate data between two service Catalog,Basket #1171

Closed dinhle2010 closed 4 years ago

dinhle2010 commented 4 years ago

Thanks for share project eShopOnContainers. My question is: Example i want check product exist before create Basket. How i can do that because product list only exist on API Catalog.

mvelosop commented 4 years ago

Hi @dinhle2010, that's a good question!

The approach with a microservices architecture is a bit different.

In this case the basket microservice doesn't need a catalog, since the items in each cart are added from the MVC (or SPA) web app, with all the information needed from the catalog.

So each cart has a copy of the data needed from each item of the catalog.

You might want to take a look at this articles from the .NET Microservices guide related to this topic:

Hope this helps.

dinhle2010 commented 4 years ago

Hi @mvelosop, Thanks for helps.