IMergeableAnnotation Interface
Types used as custom annotations can implement this interface to indicate that an attempt to use multiple annotations with the same name on a given table or column may be possible by merging the multiple annotations into one.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | 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. |
![]() | MergeWith(Object) | Merges this annotation with the given annotation and returns a new merged annotation. This method is only expected to succeed if IsCompatibleWith returns true. |
Normally there can only be one custom annotation with a given name on a given table or column. If a table or column ends up with multiple annotations, for example, because multiple CLR properties map to the same column, then an exception will be thrown. However, if the annotation type implements this interface, then the two annotations will be checked for compatibility using the IsCompatibleWith method and, if compatible, will be merged into one using the MergeWith method.