/// <summary> /// 根据主键获取一个学校单位 /// </summary> /// <param name="id">学校单位的主键</param> /// <returns>一个学校单位</returns> public School GetById(string id) { return(repository.GetById(db, id)); }
public ActionResult Edit(int Id) { var school = schoolRepository.GetById(Id); return(View(school)); }