// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Attach(Änderung).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ÄnderungExists(Änderung.ÄnderungId)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./Index")); }
// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Modulhandbuch.Add(Modulhandbuch); await _context.SaveChangesAsync(); return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Studiengang = await _context.Studiengang.FindAsync(id); if (Studiengang != null) { _context.Studiengang.Remove(Studiengang); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Fachbereich = await _context.Fachbereich.FindAsync(id); if (Fachbereich != null) { _context.Fachbereich.Remove(Fachbereich); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Dozenten = await _context.Dozenten.FindAsync(id); if (Dozenten != null) { _context.Dozenten.Remove(Dozenten); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }