Пример #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());
        }
Пример #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"));
        }
Пример #3
0
        public async Task <IActionResult> OnGetAsync(string id)
        {
            Author = _context.History.Authors.Author.FirstOrDefault(m => m.Album == id);

            return(Page());
        }