Пример #1
0
        public List <Tuple <object, string> > SelectProcess(DbReader <TestDbReader> reader)
        {
            var fields = new List <Tuple <object, string> >();

            for (int i = 0; i < reader.CountFields(); i++)
            {
                fields.Add(new Tuple <object, string>(((TestCommand)reader.GetValue(i)).Value, ""));
                fields.Add(new Tuple <object, string>(((TestCommand)reader.GetValue(i)).Local, "local"));
                fields.Add(new Tuple <object, string>(((TestCommand)reader.GetValue(i)).IsDeleted, "isdelete"));
                fields.Add(new Tuple <object, string>(((TestCommand)reader.GetValue(i)).DeleteTime, "time"));
            }

            return(fields);
        }
Пример #2
0
        public List <Tuple <object, string> > SelectProcess(DbReader <SqlDataReader> reader)
        {
            var fields = new List <Tuple <object, string> >();

            for (int i = 0; i < reader.CountFields(); i++)
            {
                var name = reader.Reader.GetName(i).Split('.').ToList().Last();
                var v    = reader.GetValue(i);
                if (v is DBNull)
                {
                    v = null;
                }
                fields.Add(new Tuple <object, string>(v, name));
            }

            return(fields);
        }