Example #1
0
        public static IEnumerable <object[]> ResultObj(this SqlProc proc
                                                       , Action <SqlField[]> onReadFields = null)
        {
            var cmd    = proc.CreateCommand();
            var helper = new DbDataMapHelper <object[]>();

            return(DbGetHelper.ExecEnumerable(proc, helper, onReadFields: onReadFields));
        }
Example #2
0
        public static DbObject Exec(SqlProc proc, Action <double> progress = null)
        {
            var mapper = new DbObject();

            mapper.Worker = DbGetHelper.ExecEnumerable(proc, mapper, progress).GetEnumerator();
            if (mapper.Worker == null)
            {
                return(null);
            }
            return(mapper);
        }
Example #3
0
        public static DbObject Exec(SqlProc proc, Action <double> progress = null, bool withFirst = true)
        {
            var mapper = new DbObject();

            mapper.Worker = DbGetHelper.ExecEnumerable(proc, mapper, progress).GetEnumerator();
            if (mapper.Worker == null)
            {
                return(null);
            }
            if (withFirst && mapper.Worker.Current == null)
            {
                mapper.Worker.MoveNext();
            }
            return(mapper);
        }
Example #4
0
        public IEnumerable <object[]> ExecEnum()
        {
            var helper = new DbDataMapHelper <object[]>();

            return(DbGetHelper.ExecEnumerable(this, helper, null));
        }