Ejemplo n.º 1
0
 public override async Task <GrpcProduct> GetProductData(GrpcIdMessage request, ServerCallContext context)
 {
     try
     {
         return(await Controller.GetProductData(request));
     }
     catch (Exception e)
     {
         throw HandleException(e);
     }
 }
        public static async Task <GrpcProduct> GetProductData(GrpcIdMessage grpcRequest)
        {
            try
            {
                var id      = grpcRequest.Id;
                var product = await ProductUseCaseController.GetProductDataAsync(id);

                return(ProductPresenter.PresentProduct(product));
            }
            catch (Exception e)
            {
                throw e;
            }
        }