public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Scripture = await _context.Scripture.FirstOrDefaultAsync(m => m.id == id); if (Scripture == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Scripture = await _context.Scripture.FindAsync(id); if (Scripture != null) { _context.Scripture.Remove(Scripture); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }