/// <summary> /// Given a stream of types, returns a stream of types where any 'relationship' types are duplicated so that their /// reverse alias also appears in the output stream. /// Caution: remember to invert the from/to types, and the cardinality, as applicable. /// </summary> /// <param name="types"></param> /// <returns></returns> IEnumerable <EffectiveType> EffectiveTypes(IEnumerable <Entity> types) { foreach (var type in types) { bool isRelationship = _schemaManager.IsInstance(type, A(Aliases.Relationship)); if (isRelationship) { continue; } var et = new EffectiveType() { Type = type, Alias = type.Alias }; yield return(et); } }