Esempio n. 1
0
        public async Task <IActionResult> OnGetAsync(Guid?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

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

            if (Sport_Shoes == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Esempio n. 2
0
        public async Task <IActionResult> OnPostAsync(Guid?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

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

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

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