public async Task <IActionResult> OnGetAsync(int id) { CuryTablLanguage = await _context.CuryTablLanguage .Include(h => h.CuryTabl) .FirstOrDefaultAsync(m => m.Id == id); CuryTablInvariant = CuryTablLanguage.CuryTabl; return(Page()); }
public async Task <IActionResult> OnPostAsync(int id) { CuryTablLanguage = await _context.CuryTablLanguage .Include(h => h.CuryTabl) .FirstOrDefaultAsync(m => m.Id == id); CuryTablInvariant = CuryTablLanguage.CuryTabl; _context.CuryTablLanguage.Remove(CuryTablLanguage); _context.CuryTablInvariant.Remove(CuryTablInvariant); await _context.SaveChangesAsync(); var url = _urlBuilder.BuildPropertyLink( this.GetLanguage(), "Cury", system: _contextUtils.GetSystemUrlByHeadClue(CuryTablInvariant.HeadClue) ); return(Redirect(url)); }