Пример #1
0
        public async Task <IActionResult> OnGetAsync(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Matches = _context.History.Finals.Matches.FirstOrDefault(m => m.Matches_id == id);

            if (Matches == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Пример #2
0
        public async Task <IActionResult> OnPostAsync(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Matches = _context.History.Finals.Matches.Find(a => a.Matches_id == id);
            if (Matches != null)
            {
                _context.History.Finals.Matches.Remove(Matches);
            }

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