Ejemplo n.º 1
0
        public async Task <IActionResult> OnPostAsync(int id)
        {
            Requests DeletedRequest = await _db.Delete(id);

            if (DeletedRequest == null)
            {
                return(NotFound());
            }
            TempData["SuccessMessage"] = "Запись удалена";
            return(RedirectToPage("./Index"));
        }