public IActionResult Detail(int id) { var departments = Department.GetDepartments(); var detail = departments.FirstOrDefault(x => x.Id == id); return(View(detail)); }
public ActionResult Detail(int id) { var departments = Department.GetDepartments(); Department department = departments.FirstOrDefault(x => x.Id.ToString() == id.ToString()); return(View(department)); }
public IActionResult Index() { var departments = Department.GetDepartments(); return(View(departments)); }