Exemplo n.º 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));
        }
Exemplo n.º 2
0
        public IList <T> Exec <T>(IList <T> list, Action <double> progress = null) where T : class
        {
            var helper = new DbDataMapHelper <T>();

            DbGetHelper.ExecFill <T>(this, list, helper, progress);

            return(list);
        }
Exemplo n.º 3
0
        public IList <T> Exec <T>(IList <T> list, Action <double> progress = null) where T : class
        {
            Ai.Assert.IsTrue(list != null, "SqlProc.Exec list null error");

            var helper = new DbDataMapHelper <T>();

            DbGetHelper.ExecFill <T>(this, list, helper, progress);

            return(list);
        }
Exemplo n.º 4
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);
        }
Exemplo n.º 5
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);
        }
Exemplo n.º 6
0
 public bool ExecMap <T>(IList <T> list, IDataMapHelper <T> mapper,
                         Action <double> progress = null) where T : class
 {
     return(DbGetHelper.ExecFill <T>(this, list, mapper, progress));
 }
Exemplo n.º 7
0
        public IEnumerable <object[]> ExecEnum()
        {
            var helper = new DbDataMapHelper <object[]>();

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