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

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

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

            return(RedirectToPage("./Index"));
        }
예제 #2
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            AnimeTagA = await _context.AnimeTagA
                        .Include(a => a.Anime)
                        .Include(a => a.TagA).FirstOrDefaultAsync(m => m.AnimeTagAID == id);

            if (AnimeTagA == null)
            {
                return(NotFound());
            }
            return(Page());
        }