示例#1
0
 public void BulkAdd(IEnumerable <DataModel.AuditLogModel> entitiesLog)
 {
     _log("begin bulkadd " + entitiesLog.Count());
     using (DWAuditLog context = new DWAuditLog())
     {
         context.Configuration.AutoDetectChangesEnabled = false;
         context.Configuration.ValidateOnSaveEnabled    = false;
         context.Audits.AddRange(entitiesLog);
         context.SaveChanges();
     }
     _log("end bulkadd " + entitiesLog.Count());
 }
示例#2
0
        public void UpdateEndDateOnComplete(int fieldsChangeCount, int countCrm, int?countCountDups, DateTime endDate)
        {
            _log("UpdateEndDateOnComplete fieldsChangeCount=" + fieldsChangeCount.ToString() + " countCrm=" + countCrm.ToString() + " enddate" + endDate.ToString("yyyyMMdd hh:mm:ss"));

            using (DWAuditLog context = new DWAuditLog())
            {
                Job job = new Job();
                job.JobId             = JobId;
                job.CountCrmLogs      = countCrm;
                job.CountFieldsChange = fieldsChangeCount;
                job.CountDuplicates   = countCountDups;
                job.EndDate           = endDate;
                context.Jobs.Add(job);
                context.SaveChanges();
            }
            _log("End UpdateEndDateOnComplete");
        }