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

            CharacterTagC = await _context.CharacterTagC
                            .Include(c => c.Character)
                            .Include(c => c.TagC).FirstOrDefaultAsync(m => m.CharacterTagCID == id);

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

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

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

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