GenerateCode Method (XmlReader, TextWriter, IEnumerable(XmlReader), Version)

EntityCodeGenerator.GenerateCode Method (XmlReader, TextWriter, IEnumerable<XmlReader>, Version)

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

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

public IList<EdmSchemaError> GenerateCode(
	XmlReader sourceEdmSchema,
	TextWriter target,
	IEnumerable<XmlReader> additionalEdmSchemas,
	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.

additionalEdmSchemas
Type: System.Collections.Generic.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
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:
© 2016 Microsoft