public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Attach(MatchSlot).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MatchSlotExists(MatchSlot.MatchSlotId)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./Index")); }
public async Task<IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return Page(); } _context.Attach(LevelTime).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LevelTimeExists(LevelTime.LevelTimeId)) { return NotFound(); } else { throw; } } return RedirectToPage("./Index"); }