internal virtual void WriteSchemaElementHeader(string schemaNamespace) { this._xmlWriter.WriteStartElement("Schema", XmlConstants.GetCsdlNamespace(this._version)); this._xmlWriter.WriteAttributeString("Namespace", schemaNamespace); this._xmlWriter.WriteAttributeString("Alias", "Self"); if (this._version == 3.0) { this._xmlWriter.WriteAttributeString("annotation", "UseStrongSpatialTypes", "http://schemas.microsoft.com/ado/2009/02/edm/annotation", "false"); } this._xmlWriter.WriteAttributeString("xmlns", "annotation", (string)null, "http://schemas.microsoft.com/ado/2009/02/edm/annotation"); this._xmlWriter.WriteAttributeString("xmlns", "customannotation", (string)null, "http://schemas.microsoft.com/ado/2013/11/edm/customannotation"); }
public ForeignKeyBuilder(EdmModel database, string name) { Check.NotNull(database, "database"); _database = database; _assocationType = new AssociationType( name, XmlConstants.GetSsdlNamespace(database.Version), true, DataSpace.SSpace); _associationSet = new AssociationSet(_assocationType.Name, _assocationType); }
internal virtual void WriteSchemaElementHeader( string schemaNamespace, string provider, string providerManifestToken, bool writeStoreSchemaGenNamespace) { this._xmlWriter.WriteStartElement("Schema", XmlConstants.GetSsdlNamespace(this._version)); this._xmlWriter.WriteAttributeString("Namespace", schemaNamespace); this._xmlWriter.WriteAttributeString("Provider", provider); this._xmlWriter.WriteAttributeString("ProviderManifestToken", providerManifestToken); this._xmlWriter.WriteAttributeString("Alias", "Self"); if (writeStoreSchemaGenNamespace) { this._xmlWriter.WriteAttributeString("xmlns", "store", (string)null, "http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator"); } this._xmlWriter.WriteAttributeString("xmlns", "customannotation", (string)null, "http://schemas.microsoft.com/ado/2013/11/edm/customannotation"); }
// virtual for testing internal virtual void WriteSchemaElementHeader(string schemaNamespace, string provider, string providerManifestToken, bool writeStoreSchemaGenNamespace) { DebugCheck.NotEmpty(schemaNamespace); DebugCheck.NotEmpty(provider); DebugCheck.NotEmpty(providerManifestToken); var xmlNamespace = XmlConstants.GetSsdlNamespace(_version); _xmlWriter.WriteStartElement(XmlConstants.Schema, xmlNamespace); _xmlWriter.WriteAttributeString(XmlConstants.Namespace, schemaNamespace); _xmlWriter.WriteAttributeString(XmlConstants.Provider, provider); _xmlWriter.WriteAttributeString(XmlConstants.ProviderManifestToken, providerManifestToken); _xmlWriter.WriteAttributeString(XmlConstants.Alias, XmlConstants.Self); if (writeStoreSchemaGenNamespace) { _xmlWriter.WriteAttributeString("xmlns", StoreSchemaGenNamespacePrefix, null, XmlConstants.EntityStoreSchemaGeneratorNamespace); } _xmlWriter.WriteAttributeString("xmlns", CustomAnnotationNamespacePrefix, null, XmlConstants.CustomAnnotationNamespace); }
// virtual for testing internal virtual void WriteSchemaElementHeader(string schemaNamespace) { DebugCheck.NotEmpty(schemaNamespace); var xmlNamespace = XmlConstants.GetCsdlNamespace(_version); _xmlWriter.WriteStartElement(XmlConstants.Schema, xmlNamespace); _xmlWriter.WriteAttributeString(XmlConstants.Namespace, schemaNamespace); _xmlWriter.WriteAttributeString(XmlConstants.Alias, XmlConstants.Self); if (_version == XmlConstants.EdmVersionForV3) { _xmlWriter.WriteAttributeString( AnnotationNamespacePrefix, XmlConstants.UseStrongSpatialTypes, XmlConstants.AnnotationNamespace, XmlConstants.False); } _xmlWriter.WriteAttributeString("xmlns", AnnotationNamespacePrefix, null, XmlConstants.AnnotationNamespace); _xmlWriter.WriteAttributeString("xmlns", CustomAnnotationNamespacePrefix, null, XmlConstants.CustomAnnotationNamespace); }