Exemplo n.º 1
0
        protected override async Task <Star> RunAsync()
        {
            var star = await ServiceData.GetAsync <Star>(_handler, $"{API_URL}/{ProductId}");

            return(star);
        }
        protected override async Task <IList <Product> > RunAsync()
        {
            var products = await ServiceData.GetAsync <IList <Product> >(_handler, API_URL);

            return(products);
        }
Exemplo n.º 3
0
        public async Task <IActionResult> IndexAsync()
        {
            IList <Product> products = await ServiceData.GetAsync <IList <Product> >(new System.Uri($"{_services.ProductServiceUrl}/api/products"));

            return(View(products));
        }
Exemplo n.º 4
0
        public async Task <IViewComponentResult> InvokeAsync(int productId)
        {
            var star = await ServiceData.GetAsync <Star>(new System.Uri($"{_services.StarServiceUrl}/api/stars/{productId}"));;

            return(View(star));
        }
Exemplo n.º 5
0
        public async Task <IViewComponentResult> InvokeAsync(int categoryId)
        {
            var category = await ServiceData.GetAsync <Category>(new System.Uri($"{_services.CategoryServiceUrl}/api/categories/{categoryId}"));;

            return(View(category));
        }
 public async Task <Price> GetPriceByProductId(int productId)
 {
     return(await ServiceData.GetAsync <Price>(_handler, $"{API_URL}/{productId}"));
 }
Exemplo n.º 7
0
        protected override async Task <Category> RunAsync()
        {
            var category = await ServiceData.GetAsync <Category>(_handler, $"{API_URL}/{CategoryId}");

            return(category);
        }
        protected override async Task <IList <Currency> > RunAsync()
        {
            var currencies = await ServiceData.GetAsync <IList <Currency> >(_handler, API_URL);

            return(currencies);
        }