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

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

            if (HighHeeledShoesColors == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Exemple #2
0
        public async Task <IActionResult> OnPostAsync(Guid?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

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

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

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