EntityCodeGenerator Class

Definition

Generates object context and entity classes (object layer code) from conceptual schema definition language (CSDL) files. Starting with Entity Framework version 4, an ObjectContext class for a specific model contains properties of type ObjectSet<TEntity> that represent the model's entity sets.

public ref class EntityCodeGenerator
public class EntityCodeGenerator
type EntityCodeGenerator = class
Public Class EntityCodeGenerator
Inheritance
EntityCodeGenerator

Constructors

EntityCodeGenerator(LanguageOption)

Initializes a new instance of the EntityCodeGenerator class with the specified language option.

Properties

EdmToObjectNamespaceMap

Gets an EdmToObjectNamespaceMap that contains the conceptual schema definition language (CSDL) to code namespace mappings.

LanguageOption

Gets or sets a LanguageOption value that indicates the language of the generated code.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
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(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, 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(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)

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(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, 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(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.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to