Пример #1
0
        public DbResult <T> Copy <T>()
        {
            var result = new DbResult <T>
            {
                Success     = this.Success,
                Exception   = this.Exception,
                Count       = this.Count,
                Info        = this.Info,
                MessageType = this.MessageType,
                ExecArgs    = this.ExecArgs
            };

            return(result);
        }
Пример #2
0
        public static DbResult <U> From <T, U>(DbResult <T> dbr, U data = default(U))
        {
            var result = new DbResult <U>
            {
                Success     = dbr.Success,
                Exception   = dbr.Exception,
                Count       = dbr.Count,
                Info        = dbr.Info,
                MessageType = dbr.MessageType,
                Data        = data,
                ExecArgs    = dbr.ExecArgs
            };

            return(result);
        }