EntityCodeGenerator.GenerateCode Method (XmlReader, TextWriter, Version)

.NET Framework (current 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.

Namespace:   System.Data.Entity.Design
Assembly:  System.Data.Entity.Design (in System.Data.Entity.Design.dll)

public IList<EdmSchemaError> GenerateCode(
	XmlReader sourceEdmSchema,
	TextWriter target,
	Version targetEntityFrameworkVersion
)

Parameters

sourceEdmSchema
Type: System.Xml.XmlReader

An XmlReader that contains the CSDL.

target
Type: System.IO.TextWriter

The TextWriter to which the object layer code is written.

targetEntityFrameworkVersion
Type: System.Version

The internal Entity Framework version that is being targeted.

Return Value

Type: System.Collections.Generic.IList<EdmSchemaError>

A list of EdmSchemaError objects that contains any generated errors.

.NET Framework
Available since 4.5
Return to top
Show: