예제 #1
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            InProceedings = await _context.InProceedings.FirstOrDefaultAsync(m => m.Id == id);

            if (InProceedings == null)
            {
                return(NotFound());
            }
            return(Page());
        }
예제 #2
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

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

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

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