// async method is required by convention #pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously public async Task <IActionResult> OnPostApprovedAsync() { Juices.AsParallel() .Where(juice => juice.IsChecked) .ForAll(juice => juiceService.ApproveJuice(juice.Name)); return(RedirectToPage()); }
public async Task <IActionResult> OnPostDeleteAsync(string name) { Juices .Where(juice => juice.IsChecked) .ToList() .ForEach(juice => juiceService.DeleteByName(juice.Name)); return(RedirectToPage()); }