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

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

.NET Framework 4.6 and 4.5

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.

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


Type: System.Xml.XmlReader

An XmlReader that contains the CSDL.

Type: System.IO.TextWriter

The TextWriter to output the generated object layer code.

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 list.

Return Value

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

A list of EdmSchemaError objects that contains any generated errors.

.NET Framework
Available since 4.0
Return to top
© 2015 Microsoft