private void WriteEntityTypeMappingElement(EntityTypeMapping entityTypeMapping) { this._xmlWriter.WriteStartElement("EntityTypeMapping"); this._xmlWriter.WriteAttributeString("TypeName", MslXmlSchemaWriter.GetEntityTypeName(this._entityTypeNamespace + "." + entityTypeMapping.EntityType.Name, entityTypeMapping.IsHierarchyMapping)); foreach (MappingFragment mappingFragment in entityTypeMapping.MappingFragments) { this.WriteMappingFragmentElement(mappingFragment); } this._xmlWriter.WriteEndElement(); }
public void WriteEntitySetMappingElement(EntitySetMapping entitySetMapping) { this._xmlWriter.WriteStartElement("EntitySetMapping"); this._xmlWriter.WriteAttributeString("Name", entitySetMapping.EntitySet.Name); foreach (EntityTypeMapping entityTypeMapping in entitySetMapping.EntityTypeMappings) { this.WriteEntityTypeMappingElement(entityTypeMapping); } foreach (EntityTypeModificationFunctionMapping modificationFunctionMapping in entitySetMapping.ModificationFunctionMappings) { this._xmlWriter.WriteStartElement("EntityTypeMapping"); this._xmlWriter.WriteAttributeString("TypeName", MslXmlSchemaWriter.GetEntityTypeName(this._entityTypeNamespace + "." + modificationFunctionMapping.EntityType.Name, false)); this.WriteModificationFunctionMapping(modificationFunctionMapping); this._xmlWriter.WriteEndElement(); } this._xmlWriter.WriteEndElement(); }
internal static string CreateFunctionImportEntityTypeMappingTypeName( FunctionImportEntityTypeMapping entityTypeMapping) { return(string.Join(";", entityTypeMapping.EntityTypes.Select <EntityType, string>((Func <EntityType, string>)(e => MslXmlSchemaWriter.GetEntityTypeName(e.FullName, false))).Concat <string>(entityTypeMapping.IsOfTypeEntityTypes.Select <EntityType, string>((Func <EntityType, string>)(e => MslXmlSchemaWriter.GetEntityTypeName(e.FullName, true)))))); }