Generator Changes at 11/17/2025 1:17:57 AM +03:30

This commit is contained in:
masoodafar-web
2025-11-17 01:20:07 +03:30
parent 19d32df0d3
commit 12bb40e0ee
18 changed files with 799 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
using FrontOffice.BFF.Protobuf.Protos.Products;
using FrontOffice.BFF.WebApi.Common.Services;
using FrontOffice.BFF.Application.ProductsCQ.Queries.GetProducts;
using FrontOffice.BFF.Application.ProductsCQ.Queries.GetAllProductsByFilter;
namespace FrontOffice.BFF.WebApi.Services;
public class ProductsService : ProductsContract.ProductsContractBase
{
private readonly IDispatchRequestToCQRS _dispatchRequestToCQRS;
public ProductsService(IDispatchRequestToCQRS dispatchRequestToCQRS)
{
_dispatchRequestToCQRS = dispatchRequestToCQRS;
}
public override async Task<GetProductsResponse> GetProducts(GetProductsRequest request, ServerCallContext context)
{
return await _dispatchRequestToCQRS.Handle<GetProductsRequest, GetProductsQuery, GetProductsResponse>(request, context);
}
public override async Task<GetAllProductsByFilterResponseModel> GetAllProductsByFilter(GetAllProductsByFilterFilter request, ServerCallContext context)
{
return await _dispatchRequestToCQRS.Handle<GetAllProductsByFilterFilter, GetAllProductsByFilterQuery, GetAllProductsByFilterResponseModel>(request, context);
}
}