Example #1
0
        public async Task <IActionResult> OnGet(string name, [FromServices] GetProduct getProduct)
        {
            Product = await getProduct.ExecAsync(name.Replace("-", " "));

            if (Product == null)
            {
                return(RedirectToPage("Index"));
            }
            return(Page());
        }