IModel IModel Interface


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


FindAnnotation(String) FindAnnotation(String)

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.

IEntityType FindEntityType(string name)
Function FindEntityType(name As String) As IEntityType
System.String System.String

The name of the entity type to find.


The entity type, or null if none are found.

GetAnnotations() GetAnnotations()

Inherited from IAnnotatable

GetEntityTypes() GetEntityTypes()

Gets all entity types defined in the model.

IEnumerable<IEntityType> GetEntityTypes()
Function GetEntityTypes As IEnumerable(Of IEntityType)
System.Collections.Generic.IEnumerable<IEntityType> System.Collections.Generic.IEnumerable(Of IEntityType)

All entity types defined in the model.


Item[String] Item(String)

Inherited from IAnnotatable