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