private static string GetAssoctiationSetNodeForStorageModel(ReferencePropertyInfo reference) { return($@" <AssociationSet Name=""{GetRefrenceName(reference)}"" Association=""Self.{GetRefrenceName(reference)}""> <End Role=""{DataStructureEdmxCodeGenerator.GetName(reference.Referenced)}"" EntitySet=""{DataStructureEdmxCodeGenerator.GetName(reference.Referenced)}"" /> <End Role=""{DataStructureEdmxCodeGenerator.GetName(reference.DataStructure)}"" EntitySet=""{DataStructureEdmxCodeGenerator.GetName(reference.DataStructure)}"" /> </AssociationSet>"); }
private static string GetAssociationSetNodeForConceptualModel(UniqueReferenceInfo uniqueReferenceInfo) { return($@" <AssociationSet Name=""{GetAssociationSetName(uniqueReferenceInfo)}"" Association=""Self.{GetAssociationSetName(uniqueReferenceInfo)}""> <End Role=""{GetAssociationSetName(uniqueReferenceInfo)}_Source"" EntitySet=""{DataStructureEdmxCodeGenerator.GetName(uniqueReferenceInfo.Extension)}"" /> <End Role=""{GetAssociationSetName(uniqueReferenceInfo)}_Target"" EntitySet=""{DataStructureEdmxCodeGenerator.GetName(uniqueReferenceInfo.Base)}"" /> </AssociationSet>" ); }
private static string GetAssoctiationNodeForConceptualModel(ReferencePropertyInfo reference) { return($@" <Association Name=""{GetRefrenceName(reference)}""> <End Role=""{GetRefrenceName(reference)}_Source"" Type=""Self.{DataStructureEdmxCodeGenerator.GetName(reference.DataStructure)}"" Multiplicity=""*"" /> <End Role=""{GetRefrenceName(reference)}_Target"" Type=""Self.{DataStructureEdmxCodeGenerator.GetName(reference.Referenced)}"" Multiplicity=""0..1"" /> <ReferentialConstraint> <Principal Role=""{GetRefrenceName(reference)}_Target""> <PropertyRef Name=""ID"" /> </Principal> <Dependent Role=""{GetRefrenceName(reference)}_Source""> <PropertyRef Name=""{reference.Name}ID"" /> </Dependent> </ReferentialConstraint> </Association>"); }
private static string GetAssociationNodeForConceptualModel(UniqueReferenceInfo uniqueReferenceInfo) { return($@" <Association Name=""{GetAssociationSetName(uniqueReferenceInfo)}""> <End Role=""{GetAssociationSetName(uniqueReferenceInfo)}_Source"" Type=""Self.{DataStructureEdmxCodeGenerator.GetName(uniqueReferenceInfo.Extension)}"" Multiplicity=""0..1"" /> <End Role=""{GetAssociationSetName(uniqueReferenceInfo)}_Target"" Type=""Self.{DataStructureEdmxCodeGenerator.GetName(uniqueReferenceInfo.Base)}"" Multiplicity=""1"" /> <ReferentialConstraint> <Principal Role=""{GetAssociationSetName(uniqueReferenceInfo)}_Target""> <PropertyRef Name=""ID"" /> </Principal> <Dependent Role=""{GetAssociationSetName(uniqueReferenceInfo)}_Source""> <PropertyRef Name=""ID"" /> </Dependent> </ReferentialConstraint> </Association>"); }
private static string GetNavigationPropertyNodeForConceptualModelForExtension(UniqueReferenceInfo uniqueReferenceInfo) { return($@" <NavigationProperty Name=""{GetNavigationPropertyNameForConceptualModelForExtension(uniqueReferenceInfo)}"" Relationship=""Self.{DataStructureEdmxCodeGenerator.GetName(uniqueReferenceInfo.Extension)}_Base"" FromRole=""{DataStructureEdmxCodeGenerator.GetName(uniqueReferenceInfo.Extension)}_Base_Target"" ToRole=""{DataStructureEdmxCodeGenerator.GetName(uniqueReferenceInfo.Extension)}_Base_Source"" />"); }