using CMSMicroservice.Protobuf.Protos.NetworkMembership; namespace BackOffice.BFF.Application.NetworkMembershipCQ.Queries.GetNetworkStatistics; public class GetNetworkStatisticsQueryHandler : IRequestHandler { private readonly IApplicationContractContext _context; public GetNetworkStatisticsQueryHandler(IApplicationContractContext context) { _context = context; } public async Task Handle(GetNetworkStatisticsQuery request, CancellationToken cancellationToken) { var grpcRequest = new GetNetworkStatisticsRequest(); var response = await _context.NetworkMemberships.GetNetworkStatisticsAsync(grpcRequest, cancellationToken: cancellationToken); return response.Adapt(); } }