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.

Syntax

Declaration

public interface IModel : IAnnotatablePublic Interface IModel
    Inherits IAnnotatable

Inherited Members

Item[String],
Item(String),
FindAnnotation(String),
FindAnnotation(String),
GetAnnotations()
GetAnnotations()

Methods summary

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

Gets all entity types defined in the model.

Methods

  • 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

  • GetEntityTypes()
    GetEntityTypes()

    Gets all entity types defined in the model.

    IEnumerable<IEntityType> GetEntityTypes()Function GetEntityTypes As IEnumerable(Of IEntityType)

    Returns

    • System.Collections.Generic.IEnumerable<T><IEntityType>
      System.Collections.Generic.IEnumerable<T>(Of IEntityType)

      All entity types defined in the model.

Details

Assembly

Microsoft.EntityFrameworkCore.dll