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

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

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

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

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

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