public IActionResult GetProducts() { return(Ok(productService.GetProducts())); }
public void OnGet() { Products = ProductService.GetProducts(); }
public IActionResult Index() { IEnumerable <Product> Products = ProductService.GetProducts(); return(View("Product", Products)); }
public void OnGet() { products = jsonFileProductService.GetProducts(); }
public IActionResult Index() { var Products = _productService.GetProducts(); return(View(Products)); }
/// <summary> /// HTTP Get Response /// </summary> public void OnGet() { // Get the products Products = ProductService.GetProducts(); }
public IEnumerable <Product> Get() { return(_jsonFileProductService.GetProducts()); }
// onGet corresponds to GET HTTP // onPost corresponds to POST HTTP public void OnGet() { // Get List of Products from ProductService Products = ProductService.GetProducts(); }
public void OnGet() { Products = ProductService.GetProducts(); Productsdb = _context.Product.ToList(); }