private IDictionary <EntityIdentifier, IMapping <TEntity> > GetMappings() { IEnumerable <IMapping <TEntity> > mappings = new IMapping <TEntity> [0]; switch (this.parameterProvider.OrphanMappingBehavior) { case OrphanMappingBehavior.Deactivate: mappings = this.mappingRepository.GetMappings(MappingSet.ActiveOnly); break; case OrphanMappingBehavior.Remove: mappings = this.mappingRepository.GetMappings(MappingSet.All); break; default: break; } return(mappings.ToDictionary(mapping => mapping.SourceSystemEntityId)); }