public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } MovieReviewOther = await _context.MovieReviewOther.FirstOrDefaultAsync(m => m.MovieReviewOtherId == id); if (MovieReviewOther == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } MovieReviewOther = await _context.MovieReviewOther.FindAsync(id); if (MovieReviewOther != null) { _context.MovieReviewOther.Remove(MovieReviewOther); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }