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

            Ispolniteli = await _context.Ispolniteli.FirstOrDefaultAsync(m => m.ID == id);

            if (Ispolniteli == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Example #2
0
        public async Task <IActionResult> OnGetAsync(long?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Ispolniteli = await _context.Ispolniteli.FirstOrDefaultAsync(m => m.ID == id);

            if (Ispolniteli == null)
            {
                return(NotFound());
            }
            Zapisi = await _context.Zapisi.Where(m => m.PerformerID == Ispolniteli.ID).ToListAsync();

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

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

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

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