Muokkaa

Jaa


EntityCodeGenerator.GenerateCode Method

Definition

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

Overloads

GenerateCode(String, String)

Creates a source code file that contains the object layer code generated from the specified conceptual schema definition language (CSDL) file.

GenerateCode(XmlReader, TextWriter)

Generates object layer code using the conceptual schema definition language (CSDL) specified in the XmlReader object, and outputs the generated code to a TextWriter.

GenerateCode(String, String, IEnumerable<String>)

Creates a source code file that contains object layer code generated from 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(String, String, Version)

Creates a source code file that contains the object layer code generated from the specified conceptual schema definition language (CSDL) file. Note that the targetEntityFrameworkVersion parameter uses internal Entity Framework version numbers as described in the EntityFrameworkVersions class.

GenerateCode(XmlReader, TextWriter, IEnumerable<XmlReader>)

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

GenerateCode(XmlReader, TextWriter, Version)

Generates object layer code using the conceptual schema definition language (CSDL) specified in the XmlReader object, and outputs the generated code to a TextWriter. Note that the targetEntityFrameworkVersion parameter uses internal EntityFramework version numbers as described in the EntityFrameworkVersions class.

GenerateCode(String, String, IEnumerable<String>, Version)

Creates a source code file that contains object layer code generated from 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. Note that the targetEntityFrameworkVersion parameter uses internal EntityFramework version numbers as described in the EntityFrameworkVersions class.

GenerateCode(XmlReader, TextWriter, IEnumerable<XmlReader>, Version)

Creates a source code file that contains the object layer code generated from the specified conceptual schema definition language (CSDL) file. Note that the targetEntityFrameworkVersion parameter uses internal Entity Framework version numbers as described in the EntityFrameworkVersions class.

GenerateCode(String, String)

Creates a source code file that contains the object layer code 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 ^ targetPath);
public System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError> GenerateCode (string sourceEdmSchemaFilePath, string targetPath);
member this.GenerateCode : string * string -> System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError>
Public Function GenerateCode (sourceEdmSchemaFilePath As String, targetPath As String) As IList(Of EdmSchemaError)

Parameters

sourceEdmSchemaFilePath
String

The path of the CSDL file.

targetPath
String

The path of the file that contains the generated object layer code.

Returns

A list of EdmSchemaError objects that contains any generated errors.

Applies to

GenerateCode(XmlReader, TextWriter)

Generates object layer code using the conceptual schema definition language (CSDL) specified in the XmlReader object, and outputs the generated 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.

target
TextWriter

The TextWriter to which the object layer code is written.

Returns

A list of EdmSchemaError objects that contains any generated errors.

Applies to

GenerateCode(String, String, IEnumerable<String>)

Creates a source code file that contains object layer code generated from 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 path of the CSDL file.

targetPath
String

The path of the file that contains the generated object layer code.

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

A list of EdmSchemaError objects that contains any generated errors.

Applies to

GenerateCode(String, String, Version)

Creates a source code file that contains the object layer code generated from the specified conceptual schema definition language (CSDL) file. Note that the targetEntityFrameworkVersion parameter uses internal Entity Framework version numbers as described in the EntityFrameworkVersions class.

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

Parameters

sourceEdmSchemaFilePath
String

The path of the CSDL file.

targetPath
String

The path of the file that contains the generated object layer code.

targetEntityFrameworkVersion
Version

The internal Entity Framework version that is being targeted.

Returns

A list of EdmSchemaError objects that contains any generated errors.

Applies to

GenerateCode(XmlReader, TextWriter, IEnumerable<XmlReader>)

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

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.

target
TextWriter

The TextWriter to output the generated object layer code.

additionalEdmSchemas
IEnumerable<XmlReader>

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

Returns

A list of EdmSchemaError objects that contains any generated errors.

Applies to

GenerateCode(XmlReader, TextWriter, Version)

Generates object layer code using the conceptual schema definition language (CSDL) specified in the XmlReader object, and outputs the generated code to a TextWriter. Note that the targetEntityFrameworkVersion parameter uses internal EntityFramework version numbers as described in the EntityFrameworkVersions class.

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

Parameters

sourceEdmSchema
XmlReader

An XmlReader that contains the CSDL.

target
TextWriter

The TextWriter to which the object layer code is written.

targetEntityFrameworkVersion
Version

The internal Entity Framework version that is being targeted.

Returns

A list of EdmSchemaError objects that contains any generated errors.

Applies to

GenerateCode(String, String, IEnumerable<String>, Version)

Creates a source code file that contains object layer code generated from 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. Note that the targetEntityFrameworkVersion parameter uses internal EntityFramework version numbers as described in the EntityFrameworkVersions class.

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

Parameters

sourceEdmSchemaFilePath
String

The path of the CSDL file.

targetPath
String

The path of the file that contains the generated object layer code.

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.

targetEntityFrameworkVersion
Version

The internal Entity Framework version that is being targeted.

Returns

A list of EdmSchemaError objects that contains any generated errors.

Applies to

GenerateCode(XmlReader, TextWriter, IEnumerable<XmlReader>, Version)

Creates a source code file that contains the object layer code generated from the specified conceptual schema definition language (CSDL) file. Note that the targetEntityFrameworkVersion parameter uses internal Entity Framework version numbers as described in the EntityFrameworkVersions class.

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

Parameters

sourceEdmSchema
XmlReader

An XmlReader that contains the CSDL.

target
TextWriter

The TextWriter to which the object layer code is written.

additionalEdmSchemas
IEnumerable<XmlReader>

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

targetEntityFrameworkVersion
Version

The internal Entity Framework version that is being targeted.

Returns

A list of EdmSchemaError objects that contains any generated errors.

Applies to