public async Task <IActionResult> OnGet(string name, [FromServices] GetProduct getProduct) { Product = await getProduct.ExecAsync(name.Replace("-", " ")); if (Product == null) { return(RedirectToPage("Index")); } return(Page()); }
public async Task <IActionResult> OnGet(string name, [FromServices] GetProduct getProduct) { Product = await getProduct.ExecAsync(name.Replace("-", " ")); if (Product == null) { return(RedirectToPage("Index")); } return(Page()); }