public IActionResult GetProducts()
 {
     return(Ok(productService.GetProducts()));
 }
Beispiel #2
0
 public void OnGet()
 {
     Products = ProductService.GetProducts();
 }
Beispiel #3
0
        public IActionResult Index()
        {
            IEnumerable <Product> Products = ProductService.GetProducts();

            return(View("Product", Products));
        }
Beispiel #4
0
 public void OnGet()
 {
     products = jsonFileProductService.GetProducts();
 }
        public IActionResult Index()
        {
            var Products = _productService.GetProducts();

            return(View(Products));
        }
Beispiel #6
0
 /// <summary>
 /// HTTP Get Response
 /// </summary>
 public void OnGet()
 {
     // Get the products
     Products = ProductService.GetProducts();
 }
Beispiel #7
0
 public IEnumerable <Product> Get()
 {
     return(_jsonFileProductService.GetProducts());
 }
Beispiel #8
0
 // onGet corresponds to GET HTTP
 // onPost corresponds to POST HTTP
 public void OnGet()
 {
     // Get List of Products from ProductService
     Products = ProductService.GetProducts();
 }
Beispiel #9
0
 public void OnGet()
 {
     Products   = ProductService.GetProducts();
     Productsdb = _context.Product.ToList();
 }