示例#1
0
        protected IList <T> ReadByKey(IDictionary <string, object> conditions)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(ORMUtil.ConstructSelectStatement(typeof(T)));
            sb.Append(ConstructWhereByDictionary(conditions));
            return(ORMUtil.ConvertDataTableToModel <T>(SQLExecutor.GetDataTable(sb.ToString(), _connectionString, conditions.Values.ToArray())));
        }
示例#2
0
        public IList <T> ReadAll()
        {
            var table = SQLExecutor.GetDataTable(ORMUtil.ConstructSelectStatement(typeof(T)), _connectionString);

            return(ORMUtil.ConvertDataTableToModel <T>(table));
        }