Ejemplo n.º 1
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            LogAppeal = await _context.LogAppeal.FirstOrDefaultAsync(m => m.ID == id);

            if (LogAppeal == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            LogAppeal = await _context.LogAppeal.FindAsync(id);

            if (LogAppeal != null)
            {
                _context.LogAppeal.Remove(LogAppeal);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }