private void AddCEntityTypeNameToEntityTypeIdentityMapping( EntityType key, DatabaseObject dbObj) { var normalizedName = key.NormalizedName; if (normalizedName == null) { Debug.Fail("null or empty Normalized Name for " + key.ToPrettyString()); return; } EntityTypeIdentity etId = null; _cEntityTypeNameToEntityTypeIdentity.TryGetValue(normalizedName, out etId); if (null == etId) { etId = _cEntityTypeNameToEntityTypeIdentity[normalizedName] = new EntityTypeIdentity(); } etId.AddTableOrView(dbObj); }
private void AddDbObjToEntityTypeNameMap(DatabaseObject key, EntityType et) { var normalizedName = et.NormalizedName; if (normalizedName == null) { Debug.Fail("null or empty Normalized Name for " + et.ToPrettyString()); return; } HashSet<Symbol> entityTypeNamesHashSet = null; _databaseObjectToCEntityTypeNamesMap.TryGetValue(key, out entityTypeNamesHashSet); if (null == entityTypeNamesHashSet) { entityTypeNamesHashSet = _databaseObjectToCEntityTypeNamesMap[key] = new HashSet<Symbol>(); } entityTypeNamesHashSet.Add(normalizedName); }
internal EntityTypeIdentity GetEntityTypeIdentityForEntityType(EntityType et) { var normalizedName = et.NormalizedName; if (normalizedName == null) { Debug.Fail("null or empty Normalized Name for " + et.ToPrettyString()); return null; } EntityTypeIdentity results; _cEntityTypeNameToEntityTypeIdentity.TryGetValue(normalizedName, out results); return results; }