mirror of https://github.com/EasyAbp/EShop.git
5 changed files with 56 additions and 6 deletions
@ -0,0 +1,19 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<Import Project="..\..\..\..\..\common.props" /> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net6.0</TargetFramework> |
|||
<RootNamespace /> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\EasyAbp.EShop.Plugins.Inventories.DaprActors\EasyAbp.EShop.Plugins.Inventories.DaprActors.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Volo.Abp.AspNetCore" Version="$(AbpVersion)" /> |
|||
<PackageReference Include="Dapr.Actors.AspNetCore" Version="$(DaprSdkVersion)" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,29 @@ |
|||
using EasyAbp.EShop.Products; |
|||
using Microsoft.AspNetCore.Builder; |
|||
using Microsoft.AspNetCore.Routing; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Volo.Abp.AspNetCore; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace EasyAbp.EShop.Plugins.Inventories.DaprActors; |
|||
|
|||
[DependsOn( |
|||
typeof(AbpAspNetCoreModule), |
|||
typeof(EShopProductsDomainSharedModule) |
|||
)] |
|||
public class EShopPluginsInventoriesDaprActorsAspNetCoreModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddActors(options => { options.Actors.RegisterActor<InventoryActor>(); }); |
|||
|
|||
Configure<AbpEndpointRouterOptions>(options => |
|||
{ |
|||
options.EndpointConfigureActions.Add(ctx => |
|||
{ |
|||
// Register actors handlers that interface with the Dapr runtime.
|
|||
ctx.Endpoints.MapActorsHandlers(); |
|||
}); |
|||
}); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue