EntityCodeGenerator.GenerateCode Method (String, String, IEnumerable<String>, Version)

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

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

public IList<EdmSchemaError> GenerateCode(
	string sourceEdmSchemaFilePath,
	string targetPath,
	IEnumerable<string> additionalEdmSchemaFilePaths,
	Version targetEntityFrameworkVersion


Type: System.String

The path of the CSDL file.

Type: System.String

The path of the file that contains the generated object layer code.

Type: System.Collections.Generic.IEnumerable<String>

A list of schema file paths that can be used to resolve any references in the source schema (the CSDL file). If the source schema does not have any dependencies, pass in an empty list.

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