예제 #1
0
        protected virtual void ResolveConflict(Entity goldRecord, EntityCollection dublicates,
                                               Dictionary <string, string> resolvedConflicts, EntitySchemaColumn column)
        {
            var sourceId = new Guid(resolvedConflicts[column.Name]);
            var source   = dublicates.FindOrFetch(dublicates.Schema.PrimaryColumn, sourceId);

            if (source != null)
            {
                var columnValue = source.FindEntityColumnValue(column.ColumnValueName);
                if (IsImageColumn(goldRecord, column.Name))
                {
                    MergeImageColumn(goldRecord, columnValue, column);
                    return;
                }
                goldRecord.SetColumnValue(column.ColumnValueName, columnValue.Value);
            }
        }