예제 #1
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            try
            {
                bool result = await _repo.Delete(id);

                if (result)
                {
                    return(RedirectToAction("Index"));
                }
                return(View("Delete", new { id }));
            }
            catch
            {
                return(RedirectToAction("Error", "Home"));
            }
        }