Exemplo n.º 1
0
        public async Task <IActionResult> OnGetAsync(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Author = _context.History.Authors.Author.FirstOrDefault(m => m.Album == id);

            if (Author == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Exemplo n.º 2
0
        public async Task <IActionResult> OnPostAsync(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Author = _context.History.Authors.Author.Find(a => a.Album == id);

            if (Author != null)
            {
                _context.History.Authors.Author.Remove(Author);
            }

            return(RedirectToPage("./Index"));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> OnGetAsync(string id)
        {
            Author = _context.History.Authors.Author.FirstOrDefault(m => m.Album == id);

            return(Page());
        }