public TypePropertyMap( DtoMetadataCache cache, IEnumerable <Type> types) { var typeSet = new HashSet <Type>(); foreach (var type in types.Where(type => !typeSet.Contains(type))) { typeSet.Add(type); } int index = 0; foreach (var type in types) { _entries.Add(new TypePropertyMapEntry( cache, type, AliasGenerator.GenerateAliasFor(type, index), index, typeSet, types)); ++index; } }
private string AppendTableNameAndAlias(StringBuilder fromAndJoinsBuff, string schemaQualifiedTableName) { var linkAlias = AliasGenerator.GenerateAliasFor(schemaQualifiedTableName, _linkTableAliasIndex++); AppendTableNameAndAlias( fromAndJoinsBuff, schemaQualifiedTableName, linkAlias); return(linkAlias); }