Ejemplo n.º 1
0
        public override Task <GetQuantityResponse> GetEffectiveQuantity(GetQuantityRequest request, Grpc.Core.ServerCallContext context)
        {
            int quantity = repository.GetCurrentQuantity(request.SKU);

            return(Task.FromResult(new GetQuantityResponse {
                Quantity = (uint)quantity
            }));
        }
        public override Task <GetQuantityResponse> GetEffectiveQuantity(GetQuantityRequest request, Grpc.Core.ServerCallContext context)
        {
            logger.LogInformation($"Received query for effective quantity of SKU {request.SKU}");
            int quantity = repository.GetCurrentQuantity(request.SKU);

            return(Task.FromResult(new GetQuantityResponse {
                Quantity = (uint)quantity
            }));
        }