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