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