/// <summary> /// 根据ID查询一条记录 /// </summary> public M_IServer SeachById(int ID) { using (SqlDataReader reader = Sql.SelReturnReader(strTableName, PK, ID)) { if (reader.Read()) { return(initMod.GetModelFromReader(reader)); } else { return(null); } } }
public M_IServer SelReturnModel(int id) { using (DbDataReader reader = DBCenter.SelReturnReader(strTableName, PK, id)) { if (reader.Read()) { return(initMod.GetModelFromReader(reader)); } else { return(null); } } }