Пример #1
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Dane = await _context.Dane.FindAsync(id);

            if (Dane != null)
            {
                _context.Dane.Remove(Dane);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }