public async Task <IActionResult> OnGetAsync(Guid?id) { if (id == null) { return(NotFound()); } TouroperatorBrand = await _context.TouroperatorBrands.FirstOrDefaultAsync(m => m.Id == id); if (TouroperatorBrand == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(Guid?id) { if (id == null) { return(NotFound()); } TouroperatorBrand = await _context.TouroperatorBrands.FindAsync(id); if (TouroperatorBrand != null) { TouroperatorBrand.IsDeleted = true; await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }