Add category service and product category support
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
<ProjectReference Include="..\FrontOffice.BFF.Application\FrontOffice.BFF.Application.csproj" />
|
||||
<ProjectReference Include="..\FrontOffice.BFF.Infrastructure\FrontOffice.BFF.Infrastructure.csproj" />
|
||||
<ProjectReference Include="..\Protobufs\FrontOffice.BFF.Products.Protobuf\FrontOffice.BFF.Products.Protobuf.csproj" />
|
||||
<ProjectReference Include="..\Protobufs\FrontOffice.BFF.Category.Protobuf\FrontOffice.BFF.Category.Protobuf.csproj" />
|
||||
<ProjectReference Include="..\Protobufs\FrontOffice.BFF.ShopingCart.Protobuf\FrontOffice.BFF.ShopingCart.Protobuf.csproj" />
|
||||
<ProjectReference Include="..\Protobufs\FrontOffice.BFF.Transaction.Protobuf\FrontOffice.BFF.Transaction.Protobuf.csproj" />
|
||||
<ProjectReference Include="..\Protobufs\FrontOffice.BFF.UserWallet.Protobuf\FrontOffice.BFF.UserWallet.Protobuf.csproj" />
|
||||
|
||||
20
src/FrontOffice.BFF.WebApi/Services/CategoriesService.cs
Normal file
20
src/FrontOffice.BFF.WebApi/Services/CategoriesService.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using FrontOffice.BFF.Application.CategoryCQ.Queries.GetAllCategories;
|
||||
using FrontOffice.BFF.Category.Protobuf.Protos.Category;
|
||||
using FrontOffice.BFF.WebApi.Common.Services;
|
||||
|
||||
namespace FrontOffice.BFF.WebApi.Services;
|
||||
|
||||
public class CategoriesService : CategoryContract.CategoryContractBase
|
||||
{
|
||||
private readonly IDispatchRequestToCQRS _dispatchRequestToCQRS;
|
||||
|
||||
public CategoriesService(IDispatchRequestToCQRS dispatchRequestToCQRS)
|
||||
{
|
||||
_dispatchRequestToCQRS = dispatchRequestToCQRS;
|
||||
}
|
||||
|
||||
public override async Task<GetCategoriesResponse> GetAllCategories(GetCategoriesRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<GetCategoriesRequest, GetAllCategoriesQuery, GetCategoriesResponse>(request, context);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user