/// <summary> /// 获取实体 /// </summary> /// <param name="key">关键字值</param> /// <returns>实体</returns> public Department GetModel(System.Int32 key) { IList <Department> lstData = dal.GetList <Department>(m => m.DeptID == key); if (lstData != null && lstData.Count > 0) { return(lstData[0]); } return(null); }