Пример #1
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            Wavepure = await _context.Wavepure
                       .FirstOrDefaultAsync(m => m.Id == id);

            return(Page());
        }
Пример #2
0
        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());
        }
Пример #3
0
        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));
        }