public async Task <IActionResult> OnGetAsync(int id) { AcOpTablLanguage = await _context.AcOpTablLanguage .Include(h => h.AcOpTabl) .FirstOrDefaultAsync(m => m.Id == id); AcOpTablInvariant = AcOpTablLanguage.AcOpTabl; return(Page()); }
public async Task <IActionResult> OnGetAsync(int id) { AcOpTablLanguage = await _context.AcOpTablLanguage .Include(h => h.AcOpTabl) .FirstOrDefaultAsync(m => m.Id == id); AcOpTablInvariant = AcOpTablLanguage.AcOpTabl; var singCodes = await _context.SingTabl.Select(s => s.SingType).Distinct().ToListAsync(); ViewData["SingCode"] = new SelectList(singCodes); return(Page()); }
public async Task <IActionResult> OnPostAsync(int id) { AcOpTablLanguage = await _context.AcOpTablLanguage .Include(h => h.AcOpTabl) .FirstOrDefaultAsync(m => m.Id == id); AcOpTablInvariant = AcOpTablLanguage.AcOpTabl; _context.AcOpTablLanguage.Remove(AcOpTablLanguage); _context.AcOpTablInvariant.Remove(AcOpTablInvariant); await _context.SaveChangesAsync(); var url = _urlBuilder.BuildPropertyLink( this.GetLanguage(), "AcoustoOptical", system: _contextUtils.GetSystemUrlByHeadClue(AcOpTablInvariant.HeadClue) ); return(Redirect(url)); }