public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Attach(DocumentType).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DocumentTypeExists(DocumentType.Id)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.AppOptions.Add(AppOptions); await _context.SaveChangesAsync(); return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(Guid?id) { if (id == null) { return(NotFound()); } AppOptions = await _context.AppOptions.FindAsync(id); if (AppOptions != null) { _context.AppOptions.Remove(AppOptions); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(Guid?id) { if (id == null) { return(NotFound()); } License = await _context.Licenses.FindAsync(id); if (License != null) { License.IsDeleted = true; await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }