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.

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

The name of the entity type to find.

Returns

The entity type, or null if none are found.

GetAnnotations() GetAnnotations()

Gets all annotations on the current object.

(Inherited from IAnnotatable)

GetEntityTypes() GetEntityTypes()

Gets all entity types defined in the model.

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

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)