IdMappingCollection
- Namespace:
PPDS.Migration.Models - Assembly:
PPDS.Migration - Kind: Class
Summary
Tracks old-to-new GUID mappings during import. Thread-safe for concurrent access during parallel import.
Members
Methods
AddMapping
void AddMapping(string entityLogicalName, Guid oldId, Guid newId)
Adds a mapping from old ID to new ID for an entity.
-
Param
entityLogicalName: The entity logical name. -
Param
oldId: The original record ID. -
Param
newId: The new record ID in the target environment.
GetMappedEntities
IEnumerable<string> GetMappedEntities()
Gets all entity logical names with mappings.
GetMappingCount
int GetMappingCount(string entityLogicalName)
Gets the count of mappings for a specific entity.
-
Param
entityLogicalName: The entity logical name. -
Returns: The number of mappings.
GetMappingsForEntity
IReadOnlyDictionary<Guid, Guid> GetMappingsForEntity(string entityLogicalName)
Gets all mappings for an entity.
-
Param
entityLogicalName: The entity logical name. -
Returns: Dictionary of old-to-new ID mappings.
GetNewId
Guid GetNewId(string entityLogicalName, Guid oldId)
Gets the new ID for an old ID, throwing if not found.
-
Param
entityLogicalName: The entity logical name. -
Param
oldId: The original record ID. -
Returns: The new record ID.
TryGetNewId
bool TryGetNewId(string entityLogicalName, Guid oldId, Guid newId)
Tries to get the new ID for an old ID.
-
Param
entityLogicalName: The entity logical name. -
Param
oldId: The original record ID. -
Param
newId: The new record ID if found. -
Returns: True if mapping exists, false otherwise.
Properties
TotalMappingCount
int TotalMappingCount { get; }
Gets the total count of mappings across all entities.