public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Albums = await _context.Albums.SingleOrDefaultAsync(m => m.Id == id); if (Albums == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Albums = await _context.Albums.FindAsync(id); if (Albums != null) { _context.Albums.Remove(Albums); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public Store.Models.Albums GetAlbumsById() { Models.Albums model = new Models.Albums(); return(model); }