mirror of https://github.com/EasyAbp/EShop.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
2 years ago | |
|---|---|---|
| .. | ||
| src | 3 years ago | |
| test/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests | 2 years ago | |
| README.md | 4 years ago | |
README.md
EShop.Plugins.Inventories.DaprActors
EShop product-inventory implementation of Dapr Actors.
Installation
-
Install the following NuGet packages. (see how)
- EasyAbp.EShop.Products.DaprActorsInventory.Domain (install at EasyAbp.EShop.Products.Domain location)
- EasyAbp.EShop.Plugins.Inventories.DaprActors.AspNetCore (install at a host project to run Actors)
-
Add
DependsOn(typeof(EShopXxxModule))attribute to configure the module dependencies. (see how) -
Configure a state store for the inventory actor. (see how)
Usage
-
Configure the DaprActors inventory provider as default.
Configure<EShopProductsOptions>(options => { // Configure as the default inventory provider options.DefaultInventoryProviderName = "DaprActors"; // Configure as the default inventory provider for MyProductGroup options.Groups.Configure<MyProductGroup>(group => { group.DefaultInventoryProviderName = "DaprActors"; }); });Better to use
DaprActorsProductInventoryProvider.DaprActorsProductInventoryProviderNameinstead of"DaprActors"as the provider name. -
Create a product and set
InventoryProviderNametoDaprActors. Then the product is specified to use the Dapr Actors inventory provider.