Ejemplo n.º 1
0
        public List <T> FindListTop <T>(int Top, string WhereSql, DbParameter[] parameters) where T : new()
        {
            StringBuilder builder = DatabaseCommon.SelectSql <T>(Top);

            builder.Append(WhereSql);
            return(DatabaseReader.ReaderToList <T>(DbHelper.ExecuteReader(CommandType.Text, builder.ToString(), parameters)));
        }
Ejemplo n.º 2
0
        public List <T> FindList <T>(string WhereSql) where T : new()
        {
            StringBuilder builder = DatabaseCommon.SelectSql <T>();

            builder.Append(WhereSql);
            return(DatabaseReader.ReaderToList <T>(DbHelper.ExecuteReader(CommandType.Text, builder.ToString())));
        }
Ejemplo n.º 3
0
        public List <T> FindListTop <T>(int Top, string propertyName, string propertyValue) where T : new()
        {
            StringBuilder builder = DatabaseCommon.SelectSql <T>(Top);

            builder.Append(" AND " + propertyName + " = " + DbHelper.DbParmChar + propertyName);
            IList <DbParameter> source = new List <DbParameter> {
                DbFactory.CreateDbParameter(DbHelper.DbParmChar + propertyName, propertyValue)
            };

            return(DatabaseReader.ReaderToList <T>(DbHelper.ExecuteReader(CommandType.Text, builder.ToString(), source.ToArray <DbParameter>())));
        }
Ejemplo n.º 4
0
        public List <T> FindListTop <T>(int Top) where T : new()
        {
            StringBuilder builder = DatabaseCommon.SelectSql <T>(Top);

            return(DatabaseReader.ReaderToList <T>(DbHelper.ExecuteReader(CommandType.Text, builder.ToString())));
        }
Ejemplo n.º 5
0
 public List <T> FindListBySql <T>(string strSql, DbParameter[] parameters)
 {
     return(DatabaseReader.ReaderToList <T>(DbHelper.ExecuteReader(CommandType.Text, strSql.ToString(), parameters)));
 }