ConventionTypeConfiguration<T>.HasTableAnnotation Method (String, Object)

 

Sets an annotation in the model for the table to which this entity is mapped. The annotation value can later be used when processing the table such as when creating migrations.

Namespace:   System.Data.Entity.ModelConfiguration.Configuration
Assembly:  EntityFramework (in EntityFramework.dll)

public ConventionTypeConfiguration<T> HasTableAnnotation(
	string name,
	object value
)

Parameters

name
Type: System.String

The annotation name, which must be a valid C#/EDM identifier.

value
Type: System.Object

The annotation value, which may be a string or some other type that can be serialized with an IMetadataAnnotationSerializer.

Return Value

Type: System.Data.Entity.ModelConfiguration.Configuration.ConventionTypeConfiguration<T>

The same configuration instance so that multiple calls can be chained.

It will likely be necessary to register a IMetadataAnnotationSerializer if the type of the annotation value is anything other than a string. Calling this method will have no effect if the annotation with the given name has already been configured.