IndexAnnotation Class
Represents the custom annotations for representing database indexes in an Entity Framework model.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | IndexAnnotation(IEnumerable<IndexAttribute>) | Initializes a new instance of the IndexAnnotation class using the given collection of indexes. |
![]() | IndexAnnotation(IndexAttribute) | Initializes a new instance of the IndexAnnotation class using the given collection of indexes. |
Name | Description | |
---|---|---|
![]() | Indexes | Gets the indexes represented by this annotation. |
Name | Description | |
---|---|---|
![]() | Equals(Object) | (Inherited from Object.) |
![]() | Finalize() | (Inherited from Object.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetType() | (Inherited from Object.) |
![]() | IsCompatibleWith(Object) | Returns true if this annotation does not conflict with the given annotation such that the two can be combined together using the MergeWith method. |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | MergeWith(Object) | Merges this annotation with the given annotation and returns a new annotation containing the merged indexes. |
![]() | ToString() | Returns a string representation of the IndexAnnotation object.(Overrides Object.ToString().) |
Name | Description | |
---|---|---|
![]() ![]() | AnnotationName | The name used when this annotation is stored in Entity Framework metadata or serialized into an SSDL/EDMX file. |
An index annotation is added to a Code First model when an IndexAttribute is placed on a mapped property of that model. This is used by Entity Framework Migrations to create indexes on mapped database columns. Note that multiple index attributes on a property will be merged into a single annotation for the column. Similarly, index attributes on multiple properties that map to the same column will be merged into a single annotation for the column. This means that one index annotation can represent multiple indexes. Within an annotation there can be only one index with any given name.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.