public IActionResult DeleteSectionConfirmed(int?id) { var section = _services.ListOfSections() .Include(s => s.Department) .SingleOrDefault(s => s.Id == id); if (section != null) { _services.DeleteSection(section); _services.Save(); } return(RedirectToAction("DepartmentList")); }