语言

SsdlSerializer.Serialize 方法

定义

重载

Serialize(EdmModel, String, String, XmlWriter, Boolean)

序列化 EdmModel 到 XmlWriter

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="Nullability")]
public virtual bool Serialize(System.Data.Entity.Core.Metadata.Edm.EdmModel dbDatabase, string provider, string providerManifestToken, System.Xml.XmlWriter xmlWriter, bool serializeDefaultNullability = true);
abstract member Serialize : System.Data.Entity.Core.Metadata.Edm.EdmModel * string * string * System.Xml.XmlWriter * bool -> bool
override this.Serialize : System.Data.Entity.Core.Metadata.Edm.EdmModel * string * string * System.Xml.XmlWriter * bool -> bool

参数

dbDatabase
EdmModel

要序列化的 EdmModel

provider
String

架构元素的提供程序信息

providerManifestToken
String

Schema 元素上的 ProviderManifestToken 信息

xmlWriter
XmlWriter

要序列化为的 XmlWriter

serializeDefaultNullability
Boolean

一个值,该值指示是否将可为 Null 属性序列化为默认值。

返回

如果模型可以序列化,则为 true;否则为 false

特性

适用于

Serialize(EdmModel, String, String, String, XmlWriter, Boolean)

序列化 EdmModel 到 XmlWriter

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="Nullability")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
public virtual bool Serialize(System.Data.Entity.Core.Metadata.Edm.EdmModel dbDatabase, string namespaceName, string provider, string providerManifestToken, System.Xml.XmlWriter xmlWriter, bool serializeDefaultNullability = true);
abstract member Serialize : System.Data.Entity.Core.Metadata.Edm.EdmModel * string * string * string * System.Xml.XmlWriter * bool -> bool
override this.Serialize : System.Data.Entity.Core.Metadata.Edm.EdmModel * string * string * string * System.Xml.XmlWriter * bool -> bool

参数

dbDatabase
EdmModel

要序列化的 EdmModel

namespaceName
String

Schema 元素上的命名空间名称

provider
String

架构元素的提供程序信息

providerManifestToken
String

Schema 元素上的 ProviderManifestToken 信息

xmlWriter
XmlWriter

要序列化为的 XmlWriter

serializeDefaultNullability
Boolean

一个值,该值指示是否将可为 Null 属性序列化为默认值。

返回

如果模型可以序列化,则为 true;否则为 false

特性

适用于