Export (0) Print
Expand All

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

.NET Framework 4.5

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

Supported in: 4.6, 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft