public override List <T> Select <T>(Expression <Func <T, bool> > express) { using (OracleConnection oct = new OracleConnection(Constring)) { oct.Open(); SelectOql cs = new SelectOql(); using (IDataReader idr = OracleSql.GetDtReader(cs.CreateSql <T>(express), oct)) { return(OracleResult.ValueToList <T>(idr)); } } }
public override List <T> Select <T>(string sql) { using (OracleConnection sct = new OracleConnection(Constring)) { sct.Open(); ics = new SelectSql(); using (IDataReader idr = OracleSql.GetDtReader(sql, sct)) { return(SqlResult.ValueToList <T>(idr)); } } }
//根据主键查询 public override T Select <T>(object Value) { using (OracleConnection oct = new OracleConnection(Constring)) { oct.Open(); ics = new SelectOql(); using (IDataReader reader = OracleSql.GetDtReader(ics.CreateSql <T>(Value), oct)) { return(OracleResult.ValueToModel <T>(reader)); } } }
/// <summary> /// 无参 /// </summary> /// <typeparam name="T"></typeparam> /// <returns></returns> public override List <T> Select <T>() { using (OracleConnection oct = new OracleConnection(Constring)) { oct.Open(); ics = new SelectOql(); using (IDataReader idr = OracleSql.GetDtReader(ics.CreateSql <T>(), oct)) { return(OracleResult.ValueToList <T>(idr)); } } }