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

            SizeOfBoots = await _context.SizeOfBoots
                          .Include(s => s.Model).FirstOrDefaultAsync(m => m.Id == id);

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

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

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

            return(RedirectToPage("./Index"));
        }
Example #3
0
        public async Task <IActionResult> OnGetAsync(Guid?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            SizeOfBoots = await _context.SizeOfBoots
                          .Include(s => s.Model).FirstOrDefaultAsync(m => m.Id == id);

            if (SizeOfBoots == null)
            {
                return(NotFound());
            }
            ViewData["ModelId"] = new SelectList(_context.BootsModel, "Id", "Name");
            return(Page());
        }