public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Attach(CourseTest).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CourseTestExists(CourseTest.CourseTestId)) { return(NotFound()); } else { throw; } } return(RedirectToPage("/Details", new { cuid = CourseTest.CourseId })); }
public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } CapacitationClass.Modified = DateTime.Now; _context.Attach(CapacitationClass).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CapacitationClassExists(CapacitationClass.CapacitationClassId)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Attach(Vertical).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!VerticalExists(Vertical.VerticalId)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./Index")); }