Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

ConfigurationSource Enum

Definition

Namespace:
Microsoft.EntityFrameworkCore.Metadata
Assembly:
Microsoft.EntityFrameworkCore.dll
Package:
Microsoft.EntityFrameworkCore v10.0.0
Package:
Microsoft.EntityFrameworkCore v3.0.0
Package:
Microsoft.EntityFrameworkCore v3.1.0
Package:
Microsoft.EntityFrameworkCore v5.0.0
Package:
Microsoft.EntityFrameworkCore v6.0.0
Package:
Microsoft.EntityFrameworkCore v7.0.0
Package:
Microsoft.EntityFrameworkCore v8.0.0
Package:
Microsoft.EntityFrameworkCore v9.0.0
Source:
ConfigurationSource.cs
Source:
ConfigurationSource.cs
Source:
ConfigurationSource.cs
Source:
ConfigurationSource.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Indicates whether an element in the IMutableModel was specified explicitly using the fluent API in OnModelCreating(ModelBuilder), through use of a .NET attribute (data annotation), or by convention via the EF Core model building conventions.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public enum ConfigurationSource
type ConfigurationSource = 
Public Enum ConfigurationSource
Inheritance
ConfigurationSource

Fields

Name Value Description
Explicit 0

Indicates that the model element was explicitly specified using the fluent API in OnModelCreating(ModelBuilder).

DataAnnotation 1

Indicates that the model element was specified through use of a .NET attribute (data annotation).

Convention 2

Indicates that the model element was specified by convention via the EF Core model building conventions.

Remarks

See Model building conventions for more information and examples.

Applies to


Feedback

Was this page helpful?