IndexAnnotation.MergeWith Method (Object)

 

Merges this annotation with the given annotation and returns a new annotation containing the merged indexes.

Namespace:   System.Data.Entity.Infrastructure.Annotations
Assembly:  EntityFramework (in EntityFramework.dll)

public virtual object MergeWith(
	object other
)

Parameters

other
Type: System.Object

The annotation to merge with this one.

Return Value

Type: System.Object

A new annotation with indexes from both annotations merged.

Exception Condition
InvalidOperationException

The other annotation contains indexes that are not compatible with indexes in this annotation.

Each index annotation contains at most one IndexAttribute with a given name. The merged annotation will contain IndexAttributes from both this and the other annotation. If both annotations contain an IndexAttribute with the same name, then the merged annotation will contain one IndexAttribute with that name.