protected override void LoadInternal(IEnumerable <SqlTableWithRecords> records, JsonOperationContext context) { using (var writer = new RelationalDatabaseWriter(this, Database)) { foreach (var table in records) { var stats = writer.Write(table, null, CancellationToken); LogStats(stats, table); } writer.Commit(); } }
protected override int LoadInternal(IEnumerable <SqlTableWithRecords> records, DocumentsOperationContext context) { var count = 0; using (var writer = new RelationalDatabaseWriter(this, Database)) { foreach (var table in records) { var stats = writer.Write(table, null, CancellationToken); LogStats(stats, table); count += stats.DeletedRecordsCount + stats.InsertedRecordsCount; } writer.Commit(); } return(count); }