IModel IModel Interface

Definition

Metadata about the shape of entities, the relationships between them, and how they map to the database. A model is typically created by overriding the OnConfiguring(DbContextOptionsBuilder) method on a derived context, or using ModelBuilder.

public interface IModel : IAnnotatable
Public Interface IModel
    Inherits IAnnotatable

Methods

FindAnnotation(String) FindAnnotation(String)

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

(Inherited from IAnnotatable)
FindEntityType(String) FindEntityType(String)

Gets the entity type with the given name. Returns null if no entity type with the given name is found.

GetAnnotations() GetAnnotations()

Gets all annotations on the current object.

(Inherited from IAnnotatable)
GetEntityTypes() GetEntityTypes()

Gets all entity types defined in the model.

Properties

Item[String] Item(String)

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

(Inherited from IAnnotatable)

Extension Methods

Microsoft.EntityFrameworkCore.SqlServerMetadataExtensions.SqlServer() Microsoft.EntityFrameworkCore.SqlServerMetadataExtensions.SqlServer()
Microsoft.EntityFrameworkCore.ModelExtensions.FindEntityType(System.Type) Microsoft.EntityFrameworkCore.ModelExtensions.FindEntityType(System.Type)
Microsoft.EntityFrameworkCore.ModelExtensions.GetChangeTrackingStrategy() Microsoft.EntityFrameworkCore.ModelExtensions.GetChangeTrackingStrategy()
Microsoft.EntityFrameworkCore.ModelExtensions.GetPropertyAccessMode() Microsoft.EntityFrameworkCore.ModelExtensions.GetPropertyAccessMode()
Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableExtensions.GetAnnotation(System.String) Microsoft.EntityFrameworkCore.Infrastructure.AnnotatableExtensions.GetAnnotation(System.String)
Microsoft.EntityFrameworkCore.Metadata.Internal.AnnotatableExtensions.AnnotationsToDebugString(System.String) Microsoft.EntityFrameworkCore.Metadata.Internal.AnnotatableExtensions.AnnotationsToDebugString(System.String)
Microsoft.EntityFrameworkCore.Metadata.Internal.ModelExtensions.GetProductVersion() Microsoft.EntityFrameworkCore.Metadata.Internal.ModelExtensions.GetProductVersion()
Microsoft.EntityFrameworkCore.Metadata.Internal.ModelExtensions.GetRootEntityTypes() Microsoft.EntityFrameworkCore.Metadata.Internal.ModelExtensions.GetRootEntityTypes()
Microsoft.EntityFrameworkCore.Metadata.Internal.ModelExtensions.ToDebugString(System.String) Microsoft.EntityFrameworkCore.Metadata.Internal.ModelExtensions.ToDebugString(System.String)
Microsoft.EntityFrameworkCore.Metadata.Internal.ModelExtensions.AsModel(System.String) Microsoft.EntityFrameworkCore.Metadata.Internal.ModelExtensions.AsModel(System.String)
Microsoft.EntityFrameworkCore.Specification.Tests.Extensions.Clone() Microsoft.EntityFrameworkCore.Specification.Tests.Extensions.Clone()
Microsoft.EntityFrameworkCore.SqliteMetadataExtensions.Sqlite() Microsoft.EntityFrameworkCore.SqliteMetadataExtensions.Sqlite()
Microsoft.EntityFrameworkCore.Metadata.ScaffoldingMetadataExtensions.Scaffolding() Microsoft.EntityFrameworkCore.Metadata.ScaffoldingMetadataExtensions.Scaffolding()
Microsoft.EntityFrameworkCore.Relational.Tests.TestRelationalMetadataExtensions.TestProvider() Microsoft.EntityFrameworkCore.Relational.Tests.TestRelationalMetadataExtensions.TestProvider()
Microsoft.EntityFrameworkCore.RelationalMetadataExtensions.Relational() Microsoft.EntityFrameworkCore.RelationalMetadataExtensions.Relational()