示例#1
0
        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));
        }
示例#3
0
        public IActionResult Index()
        {
            var departments = Department.GetDepartments();

            return(View(departments));
        }