示例#1
0
文件: Import`1.cs 项目: inxin/dipu
        protected Import(ISession session, CultureInfo cultureInfo, IImportLog log, TTable table, RoleType keyRoleType, Func <TRecord, string> keyFunction)
            : base(session, cultureInfo, log)
        {
            this.table       = table;
            this.keyRoleType = keyRoleType;
            this.keyFunction = keyFunction;

            this.recordByObject = new Dictionary <TObject, TRecord>();

            var objectsWithExternalPrimaryKey = this.Session.Extent <TObject>();

            objectsWithExternalPrimaryKey.Filter.AddExists(keyRoleType);
            this.objectsByExternalPrimaryKey = objectsWithExternalPrimaryKey.ToDictionary(item => (string)item.Strategy.GetUnitRole(keyRoleType), item => item);
        }
示例#2
0
文件: Import.cs 项目: inxin/dipu
 protected Import(ISession session, CultureInfo cultureInfo, IImportLog log)
 {
     this.session     = session;
     this.log         = log;
     this.cultureInfo = cultureInfo;
 }
示例#3
0
 public ConsoleImportLog(IImportLog chainedLog)
 {
     this.chainedLog = chainedLog;
 }
示例#4
0
 public ConsoleImportLog(IImportLog chainedLog)
 {
     this.chainedLog = chainedLog;
 }