共用方式為


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 的屬性。

傳回

清單,其中包含所有產生的錯誤。

屬性

適用於