EntityViewGenerator.GenerateViews 方法

定义

编译时,在 StorageMappingItemCollection 范围内生成视图,并创建使这些视图运行时可用的源代码文件。

重载

GenerateViews(StorageMappingItemCollection, TextWriter)

编译时,在 StorageMappingItemCollection 范围内生成视图。 将源代码文件发送到 TextWriter 以使这些视图在运行时可用。

GenerateViews(StorageMappingItemCollection, String)

编译时,在 StorageMappingItemCollection 范围内生成视图。 将使视图在运行时可用的源代码文件写入指定位置。

GenerateViews(StorageMappingItemCollection, TextWriter, Version)

编译时,在 StorageMappingItemCollection 范围内生成视图。 将源代码文件发送到 TextWriter 以使这些视图在运行时可用。

注解

默认情况下,在运行时每当对某个范围执行查询或更新时生成视图。 编译时生成视图可以通过消除运行时生成视图的开销,提高应用程序性能。

GenerateViews(StorageMappingItemCollection, TextWriter)

重要

此 API 不符合 CLS。

编译时,在 StorageMappingItemCollection 范围内生成视图。 将源代码文件发送到 TextWriter 以使这些视图在运行时可用。

public:
 System::Collections::Generic::IList<System::Data::Metadata::Edm::EdmSchemaError ^> ^ GenerateViews(System::Data::Mapping::StorageMappingItemCollection ^ mappingCollection, System::IO::TextWriter ^ outputWriter);
public System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError> GenerateViews (System.Data.Mapping.StorageMappingItemCollection mappingCollection, System.IO.TextWriter outputWriter);
[System.CLSCompliant(false)]
public System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError> GenerateViews (System.Data.Mapping.StorageMappingItemCollection mappingCollection, System.IO.TextWriter outputWriter);
member this.GenerateViews : System.Data.Mapping.StorageMappingItemCollection * System.IO.TextWriter -> System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError>
[<System.CLSCompliant(false)>]
member this.GenerateViews : System.Data.Mapping.StorageMappingItemCollection * System.IO.TextWriter -> System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError>
Public Function GenerateViews (mappingCollection As StorageMappingItemCollection, outputWriter As TextWriter) As IList(Of EdmSchemaError)

参数

mappingCollection
StorageMappingItemCollection

从其中生成视图的 StorageMappingItemCollection

outputWriter
TextWriter

所生成代码将发送至此的 TextWriter

返回

一个包含所有生成的错误的列表。

属性

适用于

GenerateViews(StorageMappingItemCollection, String)

重要

此 API 不符合 CLS。

编译时,在 StorageMappingItemCollection 范围内生成视图。 将使视图在运行时可用的源代码文件写入指定位置。

public:
 System::Collections::Generic::IList<System::Data::Metadata::Edm::EdmSchemaError ^> ^ GenerateViews(System::Data::Mapping::StorageMappingItemCollection ^ mappingCollection, System::String ^ outputPath);
public System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError> GenerateViews (System.Data.Mapping.StorageMappingItemCollection mappingCollection, string outputPath);
[System.CLSCompliant(false)]
public System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError> GenerateViews (System.Data.Mapping.StorageMappingItemCollection mappingCollection, string outputPath);
member this.GenerateViews : System.Data.Mapping.StorageMappingItemCollection * string -> System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError>
[<System.CLSCompliant(false)>]
member this.GenerateViews : System.Data.Mapping.StorageMappingItemCollection * string -> System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError>
Public Function GenerateViews (mappingCollection As StorageMappingItemCollection, outputPath As String) As IList(Of EdmSchemaError)

参数

mappingCollection
StorageMappingItemCollection

从其中生成视图的 StorageMappingItemCollection

outputPath
String

用于指定源代码文件写入位置的 String

返回

一个包含所有生成的错误的列表。

属性

适用于

GenerateViews(StorageMappingItemCollection, TextWriter, Version)

重要

此 API 不符合 CLS。

编译时,在 StorageMappingItemCollection 范围内生成视图。 将源代码文件发送到 TextWriter 以使这些视图在运行时可用。

public:
 System::Collections::Generic::IList<System::Data::Metadata::Edm::EdmSchemaError ^> ^ GenerateViews(System::Data::Mapping::StorageMappingItemCollection ^ mappingCollection, System::IO::TextWriter ^ outputWriter, Version ^ targetEntityFrameworkVersion);
[System.CLSCompliant(false)]
public System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError> GenerateViews (System.Data.Mapping.StorageMappingItemCollection mappingCollection, System.IO.TextWriter outputWriter, Version targetEntityFrameworkVersion);
[<System.CLSCompliant(false)>]
member this.GenerateViews : System.Data.Mapping.StorageMappingItemCollection * System.IO.TextWriter * Version -> System.Collections.Generic.IList<System.Data.Metadata.Edm.EdmSchemaError>
Public Function GenerateViews (mappingCollection As StorageMappingItemCollection, outputWriter As TextWriter, targetEntityFrameworkVersion As Version) As IList(Of EdmSchemaError)

参数

outputWriter
TextWriter

用来写入输出的 TextWriter

targetEntityFrameworkVersion
Version

与 Entity Framework 的目标版本相对应的 EntityFrameworkVersions 的属性。

返回

一个包含所有生成的错误的列表。

属性

适用于