語言

ViewBuilder<TEntity> 類別

定義

這個類別的實例會在使用 ModelBuilder API 時從方法回傳,且並非設計成直接在應用程式程式碼中建構。

[System.Runtime.CompilerServices.Nullable(0)]
public class ViewBuilder<TEntity> : Microsoft.EntityFrameworkCore.Metadata.Builders.ViewBuilder, Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity>> where TEntity : class
public class ViewBuilder<TEntity> : Microsoft.EntityFrameworkCore.Metadata.Builders.ViewBuilder, Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity>> where TEntity : class
[<System.Runtime.CompilerServices.Nullable(0)>]
type ViewBuilder<'Entity (requires 'Entity : null)> = class
    inherit ViewBuilder
    interface IInfrastructure<EntityTypeBuilder<'Entity>>
type ViewBuilder<'Entity (requires 'Entity : null)> = class
    inherit ViewBuilder
    interface IInfrastructure<EntityTypeBuilder<'Entity>>
Public Class ViewBuilder(Of TEntity)
Inherits ViewBuilder
Implements IInfrastructure(Of EntityTypeBuilder(Of TEntity))

類型參數

TEntity

正在設定的實體類型。

繼承
ViewBuilder<TEntity>
屬性
實作

建構函式

名稱 Description
ViewBuilder<TEntity>(StoreObjectIdentifier, EntityTypeBuilder<TEntity>)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

屬性

名稱 Description
Name

指定的視圖名稱。

(繼承來源 ViewBuilder)
Schema

指定的視圖結構。

(繼承來源 ViewBuilder)
StoreObject

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

(繼承來源 ViewBuilder)

方法

名稱 Description
Property(String)

將屬性映射到目前視圖的某欄,並回傳一個物件,若該物件被映射到多個視圖,則可用於提供視圖專屬的配置。

(繼承來源 ViewBuilder)
Property<TProperty>(Expression<Func<TEntity,TProperty>>)

將屬性映射到目前視圖的某欄,並回傳一個物件,若該物件被映射到多個視圖,則可用於提供視圖專屬的配置。

Property<TProperty>(String)

將屬性映射到目前視圖的某欄,並回傳一個物件,若該物件被映射到多個視圖,則可用於提供視圖專屬的配置。

(繼承來源 ViewBuilder)

明確介面實作

名稱 Description
IInfrastructure<EntityTypeBuilder<TEntity>>.Instance

這個類別的實例會在使用 ModelBuilder API 時從方法回傳,且並非設計成直接在應用程式程式碼中建構。

IInfrastructure<EntityTypeBuilder>.Instance

這個類別的實例會在使用 ModelBuilder API 時從方法回傳,且並非設計成直接在應用程式程式碼中建構。

(繼承來源 ViewBuilder)

擴充方法

名稱 Description
GetInfrastructure<T>(IInfrastructure<T>)

從一個被隱藏的屬性中取得價值 IInfrastructure<T>。

此方法通常由資料庫提供者(及其他擴充)使用。 它通常不被用於應用程式程式碼中。

適用於