EntityClassGenerator.GenerateCode 方法

定义

为数据模型生成代码。Generates code for the data model.

重载

GenerateCode(XmlReader, String)

为对象模型生成代码。Generates code for the object model.

GenerateCode(XmlReader, TextWriter, String)

依据参数标识的开关为数据模型生成代码。Generates code for the data model from switches identified by parameters.

GenerateCode(XmlReader, String)

为对象模型生成代码。Generates code for the object model.

public:
 System::Collections::Generic::IList<System::Data::Metadata::Edm::EdmSchemaError ^> ^ GenerateCode(System::Xml::XmlReader ^ sourceReader, System::String ^ targetFilePath);
public System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError> GenerateCode (System.Xml.XmlReader sourceReader, string targetFilePath);
member this.GenerateCode : System.Xml.XmlReader * string -> System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError>
Public Function GenerateCode (sourceReader As XmlReader, targetFilePath As String) As IList(Of EdmSchemaError)

参数

sourceReader
XmlReader

XML 读取器对象。The XML reader object.

targetFilePath
String

其中包含目标文件路径的字符串。The string that contains the path to the target file.

返回

IList<EdmSchemaError>

在生成期间发生的架构错误的列表。The list of schema errors that occurred during generation.

GenerateCode(XmlReader, TextWriter, String)

依据参数标识的开关为数据模型生成代码。Generates code for the data model from switches identified by parameters.

public:
 System::Collections::Generic::IList<System::Data::Metadata::Edm::EdmSchemaError ^> ^ GenerateCode(System::Xml::XmlReader ^ sourceReader, System::IO::TextWriter ^ targetWriter, System::String ^ namespacePrefix);
public System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError> GenerateCode (System.Xml.XmlReader sourceReader, System.IO.TextWriter targetWriter, string namespacePrefix);
member this.GenerateCode : System.Xml.XmlReader * System.IO.TextWriter * string -> System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError>
Public Function GenerateCode (sourceReader As XmlReader, targetWriter As TextWriter, namespacePrefix As String) As IList(Of EdmSchemaError)

参数

sourceReader
XmlReader

XML 读取器对象。The XML reader object.

targetWriter
TextWriter

文本编写器对象。The text writer object.

namespacePrefix
String

其中包含命名空间前缀的字符串。The string that contains the namespace prefix.

返回

IList<EdmSchemaError>

在生成期间发生的架构错误的列表。The list of schema errors that occurred during generation.

注解

用作与 namespacePrefix 默认容器处于相同命名空间中的类型的唯一命名空间,或用作所有其他情况下服务器提供的命名空间的前缀。The namespacePrefix is used as the only namespace for types in the same namespace as the default container, or as a prefix for the server-provided namespace in all other cases. 如果 namespacePrefixnull ,则服务器提供的命名空间用于所有类型。If namespacePrefix is null, the server-provided namespaces are used for all types.

适用于