This solution follows the Multiservice pattern for Microsoft Orleans; it was generated with Modern.CSharp.Templates 3.0.0 by this command:
dotnet new mcs-orleans-multiservice --RootNamespace InnoWvateDotNet.EShop --Multiservice TeamA --Logicalservice Catalog
The BasketService was added with this PowerShell command:
.\AddLogicalService.ps1 Basket
After this, the Catalog logical service was moved to the TeamB multiservice solution; the Basket service remains in the TeamA solution.
See the pattern rules for how to structure code in this solution (this will be supported by a Roslyn code analyzer in a later template version).
Use AddLogicalService.ps1 <name> to add more logical services to the solution.
This sample currently targets:
- .NET 10
- Microsoft Orleans 10
- The TeamA API host runs on
http://localhost:5112 BasketServiceconsumes theCatalogServicecontract from TeamB through an OpenAPI-generated client- Normal TeamA builds use the checked-in
BasketService/CatalogService.jsonsnapshot and do not require TeamB to be running - To refresh the OpenAPI snapshot and regenerate the client from the live TeamB API on
http://localhost:5113, either:dotnet build eShopTeamAof2.sln -p:RefreshOpenApiReferences=trueor deleteBasketService/CatalogService.jsonand build the solution - If the snapshot is missing and TeamB is not running, the build fails with an MSBuild download error pointing to
http://localhost:5113/swagger/v1/swagger.json