private ArrayList <TResult> GetListResult <TResult>(DbCommand cmd, DbTrans dbTran) { try { using (ISourceReader reader = dbProvider.ExecuteReader(cmd, dbTran)) { ArrayList <TResult> list = new ArrayList <TResult>(); if (typeof(TResult) == typeof(object[])) { while (reader.Read()) { List <object> objs = new List <object>(); for (int row = 0; row < reader.FieldCount; row++) { objs.Add(reader.GetValue(row)); } TResult result = (TResult)(objs.ToArray() as object); list.Add(result); } } else { while (reader.Read()) { list.Add(reader.GetValue <TResult>(0)); } } reader.Close(); return(list); } } catch { throw; } }