public async Task <IActionResult> OnPost() { if (!ModelState.IsValid) { // var errors = ModelState.Values.SelectMany(v => v.Errors); Drinks = await drinks.GetAllDrinks(); return(Page()); } var badgeExists = await badge.Find(drinkOrder.BadgeSerial); if (badgeExists != null) { await AddOrder(badgeExists); } return(RedirectToPage("./Thanks")); }