Model Model Class

Definition

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public class Model : ConventionalAnnotatable, IMutableModel, IModel, IMutableAnnotatable, IAnnotatable
Public Class Model
    Inherits ConventionalAnnotatable
    Implements IMutableModel, IModel, IMutableAnnotatable, IAnnotatable
Inheritance
Implements

Constructors

Model() Model()

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public Model()
Public Sub New

Model(ConventionSet) Model(ConventionSet)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public Model(ConventionSet conventions)
Public Sub New(conventions As ConventionSet)
Parameters

Properties

Builder Builder

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual InternalModelBuilder Builder { get; }
Public Overridable ReadOnly Property Builder As InternalModelBuilder

ChangeTrackingStrategy ChangeTrackingStrategy

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual ChangeTrackingStrategy ChangeTrackingStrategy { get; set; }
Public Overridable Property ChangeTrackingStrategy As ChangeTrackingStrategy

ConventionDispatcher ConventionDispatcher

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual ConventionDispatcher ConventionDispatcher { get; }
Public Overridable ReadOnly Property ConventionDispatcher As ConventionDispatcher

DebugView DebugView

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual DebugView<Model> DebugView { get; }
Public Overridable ReadOnly Property DebugView As DebugView(Of Model)

Item[String] Item(String)

Gets the value annotation with the given name, returning null if it does not exist.

(Inherited from Annotatable)

Methods

AddAnnotation(String, Annotation) AddAnnotation(String, Annotation)

Adds an annotation to this object. Throws if an annotation with the specified name already exists.

(Inherited from Annotatable)

AddAnnotation(String, Object) AddAnnotation(String, Object)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

(Inherited from ConventionalAnnotatable)

AddAnnotation(String, Object, ConfigurationSource) AddAnnotation(String, Object, ConfigurationSource)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

(Inherited from ConventionalAnnotatable)

AddEntityType(String, ConfigurationSource, Boolean) AddEntityType(String, ConfigurationSource, Boolean)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual EntityType AddEntityType(string name, ConfigurationSource configurationSource = ConfigurationSource.Explicit, bool runConventions = true)
Public Overridable Function AddEntityType(name As String, configurationSource As ConfigurationSource = ConfigurationSource.Explicit, runConventions As Boolean = True) As EntityType
Parameters
name
System.String System.String
runConventions
System.Boolean System.Boolean
Returns

AddEntityType(Type, ConfigurationSource, Boolean) AddEntityType(Type, ConfigurationSource, Boolean)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual EntityType AddEntityType(Type type, ConfigurationSource configurationSource = ConfigurationSource.Explicit, bool runConventions = true)
Public Overridable Function AddEntityType(type As Type, configurationSource As ConfigurationSource = ConfigurationSource.Explicit, runConventions As Boolean = True) As EntityType
Parameters
type
System.Type System.Type
runConventions
System.Boolean System.Boolean
Returns

CreateAnnotation(String, Object) CreateAnnotation(String, Object)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

(Inherited from ConventionalAnnotatable)

Equals(Object) Equals(Object)

Inherited from System.Object

Equals(Object, Object) Equals(Object, Object)

Inherited from System.Object

FindAnnotation(String) FindAnnotation(String)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

(Inherited from ConventionalAnnotatable)

FindEntityType(String) FindEntityType(String)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual EntityType FindEntityType(string name)
Public Overridable Function FindEntityType(name As String) As EntityType
Parameters
name
System.String System.String
Returns

FindEntityType(Type) FindEntityType(Type)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual EntityType FindEntityType(Type type)
Public Overridable Function FindEntityType(type As Type) As EntityType
Parameters
type
System.Type System.Type
Returns

FindIgnoredTypeConfigurationSource(String) FindIgnoredTypeConfigurationSource(String)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual ConfigurationSource? FindIgnoredTypeConfigurationSource(string name)
Public Overridable Function FindIgnoredTypeConfigurationSource(name As String) As ConfigurationSource?
Parameters
name
System.String System.String
Returns
System.Nullable<ConfigurationSource> System.Nullable(Of ConfigurationSource)

FindIgnoredTypeConfigurationSource(Type) FindIgnoredTypeConfigurationSource(Type)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual ConfigurationSource? FindIgnoredTypeConfigurationSource(Type type)
Public Overridable Function FindIgnoredTypeConfigurationSource(type As Type) As ConfigurationSource?
Parameters
type
System.Type System.Type
Returns
System.Nullable<ConfigurationSource> System.Nullable(Of ConfigurationSource)

GetAnnotations() GetAnnotations()

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

(Inherited from ConventionalAnnotatable)

GetEntityTypes() GetEntityTypes()

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual IEnumerable<EntityType> GetEntityTypes()
Public Overridable Function GetEntityTypes As IEnumerable(Of EntityType)
Returns
System.Collections.Generic.IEnumerable<EntityType> System.Collections.Generic.IEnumerable(Of EntityType)

GetHashCode() GetHashCode()

Inherited from System.Object

GetOrAddAnnotation(String, Object) GetOrAddAnnotation(String, Object)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

(Inherited from ConventionalAnnotatable)

GetOrAddEntityType(String) GetOrAddEntityType(String)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual EntityType GetOrAddEntityType(string name)
Public Overridable Function GetOrAddEntityType(name As String) As EntityType
Parameters
name
System.String System.String
Returns

GetOrAddEntityType(Type) GetOrAddEntityType(Type)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual EntityType GetOrAddEntityType(Type type)
Public Overridable Function GetOrAddEntityType(type As Type) As EntityType
Parameters
type
System.Type System.Type
Returns

GetType() GetType()

Inherited from System.Object

Ignore(String, ConfigurationSource, Boolean) Ignore(String, ConfigurationSource, Boolean)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual void Ignore(string name, ConfigurationSource configurationSource = ConfigurationSource.Explicit, bool runConventions = true)
Public Overridable Sub Ignore(name As String, configurationSource As ConfigurationSource = ConfigurationSource.Explicit, runConventions As Boolean = True)
Parameters
name
System.String System.String
runConventions
System.Boolean System.Boolean

Ignore(Type, ConfigurationSource, Boolean) Ignore(Type, ConfigurationSource, Boolean)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual void Ignore(Type type, ConfigurationSource configurationSource = ConfigurationSource.Explicit, bool runConventions = true)
Public Overridable Sub Ignore(type As Type, configurationSource As ConfigurationSource = ConfigurationSource.Explicit, runConventions As Boolean = True)
Parameters
type
System.Type System.Type
runConventions
System.Boolean System.Boolean

MemberwiseClone() MemberwiseClone()

Inherited from System.Object

OnAnnotationSet(String, Annotation, Annotation) OnAnnotationSet(String, Annotation, Annotation)

Runs the corresponding conventions when an annotation was set or removed.

(Inherited from Annotatable)

ReferenceEquals(Object, Object) ReferenceEquals(Object, Object)

Inherited from System.Object

RemoveAnnotation(String) RemoveAnnotation(String)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

(Inherited from ConventionalAnnotatable)

RemoveEntityType(String) RemoveEntityType(String)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual EntityType RemoveEntityType(string name)
Public Overridable Function RemoveEntityType(name As String) As EntityType
Parameters
name
System.String System.String
Returns

RemoveEntityType(Type) RemoveEntityType(Type)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual EntityType RemoveEntityType(Type type)
Public Overridable Function RemoveEntityType(type As Type) As EntityType
Parameters
type
System.Type System.Type
Returns

SetAnnotation(String, Annotation) SetAnnotation(String, Annotation)

Sets the annotation stored under the given key. Overwrites the existing annotation if an annotation with the specified name already exists.

(Inherited from Annotatable)

SetAnnotation(String, Object, ConfigurationSource) SetAnnotation(String, Object, ConfigurationSource)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

(Inherited from ConventionalAnnotatable)

ToString() ToString()

Inherited from System.Object

Unignore(String) Unignore(String)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual void Unignore(string name)
Public Overridable Sub Unignore(name As String)
Parameters
name
System.String System.String

Unignore(Type) Unignore(Type)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual void Unignore(Type type)
Public Overridable Sub Unignore(type As Type)
Parameters
type
System.Type System.Type

Validate() Validate()

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual InternalModelBuilder Validate()
Public Overridable Function Validate As InternalModelBuilder
Returns

Explicit Interface Implementations

IAnnotatable.FindAnnotation(String) Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable.FindAnnotation(String)

Gets the annotation with the given name, returning null if it does not exist.

(Inherited from Annotatable)

IAnnotatable.GetAnnotations() Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable.GetAnnotations()

Gets all annotations on the current object.

(Inherited from Annotatable)

IModel.FindEntityType(String) Microsoft.EntityFrameworkCore.Metadata.IModel.FindEntityType(String)

IEntityType IModel.FindEntityType(string name)
Function Microsoft.EntityFrameworkCore.Metadata.IModel.FindEntityType(name As String) As IEntityType Implements IModel.FindEntityType
Parameters
name
System.String System.String
Returns

IModel.GetEntityTypes() Microsoft.EntityFrameworkCore.Metadata.IModel.GetEntityTypes()

IEnumerable<IEntityType> IModel.GetEntityTypes()
Function Microsoft.EntityFrameworkCore.Metadata.IModel.GetEntityTypes As IEnumerable(Of IEntityType) Implements IModel.GetEntityTypes
Returns
System.Collections.Generic.IEnumerable<IEntityType> System.Collections.Generic.IEnumerable(Of IEntityType)

IMutableModel.AddEntityType(String) Microsoft.EntityFrameworkCore.Metadata.IMutableModel.AddEntityType(String)

IMutableEntityType IMutableModel.AddEntityType(string name)
Function Microsoft.EntityFrameworkCore.Metadata.IMutableModel.AddEntityType(name As String) As IMutableEntityType Implements IMutableModel.AddEntityType
Parameters
name
System.String System.String
Returns

IMutableModel.AddEntityType(Type) Microsoft.EntityFrameworkCore.Metadata.IMutableModel.AddEntityType(Type)

IMutableEntityType IMutableModel.AddEntityType(Type type)
Function Microsoft.EntityFrameworkCore.Metadata.IMutableModel.AddEntityType(type As Type) As IMutableEntityType Implements IMutableModel.AddEntityType
Parameters
type
System.Type System.Type
Returns

IMutableModel.FindEntityType(String) Microsoft.EntityFrameworkCore.Metadata.IMutableModel.FindEntityType(String)

IMutableEntityType IMutableModel.FindEntityType(string name)
Function Microsoft.EntityFrameworkCore.Metadata.IMutableModel.FindEntityType(name As String) As IMutableEntityType Implements IMutableModel.FindEntityType
Parameters
name
System.String System.String
Returns

IMutableModel.GetEntityTypes() Microsoft.EntityFrameworkCore.Metadata.IMutableModel.GetEntityTypes()

IEnumerable<IMutableEntityType> IMutableModel.GetEntityTypes()
Function Microsoft.EntityFrameworkCore.Metadata.IMutableModel.GetEntityTypes As IEnumerable(Of IMutableEntityType) Implements IMutableModel.GetEntityTypes
Returns
System.Collections.Generic.IEnumerable<IMutableEntityType> System.Collections.Generic.IEnumerable(Of IMutableEntityType)

IMutableModel.RemoveEntityType(String) Microsoft.EntityFrameworkCore.Metadata.IMutableModel.RemoveEntityType(String)

IMutableEntityType IMutableModel.RemoveEntityType(string name)
Function Microsoft.EntityFrameworkCore.Metadata.IMutableModel.RemoveEntityType(name As String) As IMutableEntityType Implements IMutableModel.RemoveEntityType
Parameters
name
System.String System.String
Returns