This commit is contained in:
King
2025-09-28 15:24:13 +03:30
parent 514b3a5975
commit 4241523443
222 changed files with 8139 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
using BackOffice.BFF.Application.UserCQ.Queries.GetUser;
using CMSMicroservice.Protobuf.Protos.Package;
namespace BackOffice.BFF.Application.PackageCQ.Queries.GetPackage;
public class GetPackageQueryHandler : IRequestHandler<GetPackageQuery, GetPackageResponseDto>
{
private readonly IApplicationContractContext _context;
public GetPackageQueryHandler(IApplicationContractContext context)
{
_context = context;
}
public async Task<GetPackageResponseDto> Handle(GetPackageQuery request, CancellationToken cancellationToken)
{
var response = await _context.Packages.GetPackageAsync(request.Adapt<GetPackageRequest>(), cancellationToken: cancellationToken);
return response.Adapt<GetPackageResponseDto>();
}
}