Esempio n. 1
0
        /// <summary>从文件恢复数据</summary>
        /// <param name="file">zip压缩文件</param>
        /// <param name="table">数据表</param>
        /// <param name="setSchema">是否设置数据表模型,自动建表</param>
        /// <returns></returns>
        public Int64 Restore(String file, IDataTable table, Boolean setSchema = true)
        {
            var dpk = new DbPackage {
                Dal = this, Tracer = Tracer ?? GlobalTracer, Log = XTrace.Log
            };

            return(dpk.Restore(file, table, setSchema));
        }
Esempio n. 2
0
        /// <summary>从数据流恢复数据</summary>
        /// <param name="stream">数据流</param>
        /// <param name="table">数据表</param>
        /// <returns></returns>
        public Int32 Restore(Stream stream, IDataTable table)
        {
            var dpk = new DbPackage {
                Dal = this, Tracer = Tracer ?? GlobalTracer, Log = XTrace.Log
            };

            return(dpk.Restore(stream, table));
        }