Edit

Share via


EntityClassGenerator.GenerateCode Method

Definition

Generates a source code file that contains the objects generated from the conceptual schema definition language (CSDL) file.

Overloads

GenerateCode(String, String)

Generates a source code file that contains the objects that were generated from the specified conceptual schema definition language (CSDL) file.

GenerateCode(XmlReader, TextWriter)

Generates source code using the conceptual schema definition language (CSDL) file contained in the XmlReader object and outputs the generated source code to a TextWriter.

GenerateCode(String, String, IEnumerable<String>)

Generates source code using the specified conceptual schema definition language (CSDL) file. The list of schema file paths is used to resolve any references contained in the CSDL file.

GenerateCode(XmlReader, TextWriter, IEnumerable<XmlReader>)

Generates source code based on the conceptual schema definition language (CSDL) file in the XmlReader object, then outputs the generated source code to a TextWriter. An IList of XmlReader objects is used to resolve any references that are contained in the CSDL file.

GenerateCode(String, String)

Generates a source code file that contains the objects that were generated from the specified conceptual schema definition language (CSDL) file.

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

Parameters

sourceEdmSchemaFilePath
String

The CSDL file path.

targetFilePath
String

The generated source code file path.

Returns

An IList of EdmSchemaError that contains any generated errors.

Applies to

GenerateCode(XmlReader, TextWriter)

Generates source code using the conceptual schema definition language (CSDL) file contained in the XmlReader object and outputs the generated source code to a TextWriter.

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

Parameters

sourceEdmSchema
XmlReader

An XmlReader that contains the CSDL file.

target
TextWriter

The TextWriter to which the source code is written.

Returns

An IList of EdmSchemaError that contains any generated errors.

Applies to

GenerateCode(String, String, IEnumerable<String>)

Generates source code using the specified conceptual schema definition language (CSDL) file. The list of schema file paths is used to resolve any references contained in the CSDL file.

public:
 System::Collections::Generic::IList<System::Data::Metadata::Edm::EdmSchemaError ^> ^ GenerateCode(System::String ^ sourceEdmSchemaFilePath, System::String ^ targetPath, System::Collections::Generic::IEnumerable<System::String ^> ^ additionalEdmSchemaFilePaths);
public System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError> GenerateCode (string sourceEdmSchemaFilePath, string targetPath, System.Collections.Generic.IEnumerable<string> additionalEdmSchemaFilePaths);
member this.GenerateCode : string * string * seq<string> -> System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError>
Public Function GenerateCode (sourceEdmSchemaFilePath As String, targetPath As String, additionalEdmSchemaFilePaths As IEnumerable(Of String)) As IList(Of EdmSchemaError)

Parameters

sourceEdmSchemaFilePath
String

The CSDL file path.

targetPath
String

The generated source code file path.

additionalEdmSchemaFilePaths
IEnumerable<String>

A list of schema file paths that can be used to resolve any references in the source schema (the CSDL file). If the source schema does not have any dependencies, pass in an empty list.

Returns

An IList of EdmSchemaError objects that contains any generated errors.

Applies to

GenerateCode(XmlReader, TextWriter, IEnumerable<XmlReader>)

Generates source code based on the conceptual schema definition language (CSDL) file in the XmlReader object, then outputs the generated source code to a TextWriter. An IList of XmlReader objects is used to resolve any references that are contained in the CSDL file.

public:
 System::Collections::Generic::IList<System::Data::Metadata::Edm::EdmSchemaError ^> ^ GenerateCode(System::Xml::XmlReader ^ sourceEdmSchema, System::IO::TextWriter ^ target, System::Collections::Generic::IEnumerable<System::Xml::XmlReader ^> ^ additionalEdmSchemas);
public System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError> GenerateCode (System.Xml.XmlReader sourceEdmSchema, System.IO.TextWriter target, System.Collections.Generic.IEnumerable<System.Xml.XmlReader> additionalEdmSchemas);
member this.GenerateCode : System.Xml.XmlReader * System.IO.TextWriter * seq<System.Xml.XmlReader> -> System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError>
Public Function GenerateCode (sourceEdmSchema As XmlReader, target As TextWriter, additionalEdmSchemas As IEnumerable(Of XmlReader)) As IList(Of EdmSchemaError)

Parameters

sourceEdmSchema
XmlReader

An XmlReader that contains the CSDL file.

target
TextWriter

The TextWriter to which you want to output the generated source code.

additionalEdmSchemas
IEnumerable<XmlReader>

The list of XmlReader objects that contain schemas that are referenced by the source schema (the CSDL file). If the source schema does not have any dependencies, pass in an empty IList object.

Returns

A list of EdmSchemaError objects that contains any generated errors.

Applies to