using CMSMicroservice.Protobuf.Protos.NetworkMembership; namespace BackOffice.BFF.Application.NetworkMembershipCQ.Queries.GetNetworkTree; public class GetNetworkTreeQueryHandler : IRequestHandler { private readonly IApplicationContractContext _context; public GetNetworkTreeQueryHandler(IApplicationContractContext context) { _context = context; } public async Task Handle(GetNetworkTreeQuery request, CancellationToken cancellationToken) { var response = await _context.NetworkMemberships.GetNetworkTreeAsync( request.Adapt(), cancellationToken: cancellationToken); return response.Adapt(); } }