IncludeMetadataConvention Class

Definition

Caution

The IncludeMetadataConvention is no longer used. EdmMetadata is not included in the model. <see cref="EdmModelDiffer" /> is now used to detect changes in the model.

This DbModelBuilder convention causes DbModelBuilder to include metadata about the model when it builds the model. When DbContext creates a model by convention it will add this convention to the list of those used by the DbModelBuilder. This will then result in model metadata being written to the database if the DbContext is used to create the database. This can then be used as a quick check to see if the model has changed since the last time it was used against the database. This convention can be removed from the DbModelBuilder conventions by overriding the OnModelCreating method on a derived DbContext class.

[System.Obsolete("The IncludeMetadataConvention is no longer used. EdmMetadata is not included in the model. <see cref="EdmModelDiffer" /> is now used to detect changes in the model.")]
public class IncludeMetadataConvention : System.Data.Entity.ModelConfiguration.Conventions.Convention
type IncludeMetadataConvention = class
    inherit Convention
Public Class IncludeMetadataConvention
Inherits Convention
Inheritance
IncludeMetadataConvention
Inheritance
IncludeMetadataConvention
Attributes

Constructors

IncludeMetadataConvention()

Methods

Properties()

Begins configuration of a lightweight convention that applies to all properties in the model.

(Inherited from Convention)
Properties<T>()

Begins configuration of a lightweight convention that applies to all primitive properties of the specified type in the model.

(Inherited from Convention)
Types()

Begins configuration of a lightweight convention that applies to all mapped types in the model.

(Inherited from Convention)
Types<T>()

Begins configuration of a lightweight convention that applies to all mapped types in the model that derive from or implement the specified type.

(Inherited from Convention)

Applies to