public async Task <IActionResult> OnGetAsync(int id) { PzElTablLanguage = await _context.PzElTablLanguage .Include(h => h.PzElTabl) .FirstOrDefaultAsync(m => m.Id == id); PzElTablInvariant = PzElTablLanguage.PzElTabl; return(Page()); }
public async Task <IActionResult> OnGetAsync(int id) { PzElTablLanguage = await _context.PzElTablLanguage .Include(h => h.PzElTabl) .FirstOrDefaultAsync(m => m.Id == id); PzElTablInvariant = PzElTablLanguage.PzElTabl; 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) { PzElTablLanguage = await _context.PzElTablLanguage .Include(h => h.PzElTabl) .FirstOrDefaultAsync(m => m.Id == id); PzElTablInvariant = PzElTablLanguage.PzElTabl; _context.PzElTablLanguage.Remove(PzElTablLanguage); _context.PzElTablInvariant.Remove(PzElTablInvariant); await _context.SaveChangesAsync(); var url = _urlBuilder.BuildPropertyLink( this.GetLanguage(), "Piezoelectric", system: _contextUtils.GetSystemUrlByHeadClue(PzElTablInvariant.HeadClue) ); return(Redirect(url)); }