Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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"));
        }