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