Browse Source
Merge pull request #201 from EasyAbp/jadyn/fix-default-inventory-provider-fallback
fix `EShopProductsOptions.DefaultInventoryProviderName` fall back
pull/203/head
Super
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductInventoryProviderResolver.cs
|
|
@ -56,7 +56,7 @@ public class ProductInventoryProviderResolver : IProductInventoryProviderResolve |
|
|
if (providerName.IsNullOrEmpty()) |
|
|
if (providerName.IsNullOrEmpty()) |
|
|
{ |
|
|
{ |
|
|
var options = ServiceProvider.GetRequiredService<IOptions<EShopProductsOptions>>(); |
|
|
var options = ServiceProvider.GetRequiredService<IOptions<EShopProductsOptions>>(); |
|
|
providerName = options.Value.DefaultInventoryProviderName; |
|
|
providerName = options.Value.DefaultInventoryProviderName ?? DefaultProductInventoryProvider.DefaultProductInventoryProviderName; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
TryBuildNameToProviderTypeMapping(); |
|
|
TryBuildNameToProviderTypeMapping(); |
|
|
|