Generator Changes at 11/20/2025 12:22:59 AM +03:30
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
namespace FrontOffice.BFF.WebApi.Common.Mappings;
|
||||
|
||||
public class ShopingCartProfile : IRegister
|
||||
{
|
||||
void IRegister.Register(TypeAdapterConfig config)
|
||||
{
|
||||
//config.NewConfig<Source,Destination>()
|
||||
// .Map(dest => dest.FullName, src => $"{src.Firstname} {src.Lastname}");
|
||||
}
|
||||
}
|
||||
27
src/FrontOffice.BFF.WebApi/Services/ShopingCartService.cs
Normal file
27
src/FrontOffice.BFF.WebApi/Services/ShopingCartService.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using FrontOffice.BFF.Protobuf.Protos.ShopingCart;
|
||||
using FrontOffice.BFF.WebApi.Common.Services;
|
||||
using FrontOffice.BFF.Application.ShopingCartCQ.Commands.AddNewUserCart;
|
||||
using FrontOffice.BFF.Application.ShopingCartCQ.Queries.GetAllUserCart;
|
||||
using FrontOffice.BFF.Application.ShopingCartCQ.Commands.UpdateUserCart;
|
||||
namespace FrontOffice.BFF.WebApi.Services;
|
||||
public class ShopingCartService : ShopingCartContract.ShopingCartContractBase
|
||||
{
|
||||
private readonly IDispatchRequestToCQRS _dispatchRequestToCQRS;
|
||||
|
||||
public ShopingCartService(IDispatchRequestToCQRS dispatchRequestToCQRS)
|
||||
{
|
||||
_dispatchRequestToCQRS = dispatchRequestToCQRS;
|
||||
}
|
||||
public override async Task<Empty> AddNewUserCart(AddNewUserCartRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<AddNewUserCartRequest, AddNewUserCartCommand>(request, context);
|
||||
}
|
||||
public override async Task<GetAllUserCartResponse> GetAllUserCart(Empty request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<GetAllUserCartQuery, GetAllUserCartResponse>(context);
|
||||
}
|
||||
public override async Task<Empty> UpdateUserCart(UpdateUserCartRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<UpdateUserCartRequest, UpdateUserCartCommand>(request, context);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user