語言

ConfigurationSource 列舉

定義

表示 中的IMutableModel元素是透過 .NET 屬性(資料註解)或依慣例透過 EF Core 模型建構慣例,明確使用 fluent API OnModelCreating(ModelBuilder)在 中指定。

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

public enum ConfigurationSource
type ConfigurationSource = 
Public Enum ConfigurationSource
繼承
ConfigurationSource

欄位

名稱 值 Description
Explicit 0

表示模型元素已明確指定為使用 Fluent API 的 OnModelCreating(ModelBuilder)。

DataAnnotation 1

表示模型元素是透過使用 .NET 屬性(資料註解)指定。

Convention 2

表示模型元素是依照 EF Core 模型建構慣例指定的。

備註

更多資訊與範例請參閱 模型建構慣例 。

適用於