AnnotationValues Class

Definition

Represents a pair of annotation values in a scaffolded or hand-coded DbMigration.

public sealed class AnnotationValues
type AnnotationValues = class
Public NotInheritable Class AnnotationValues
Inheritance
AnnotationValues

Remarks

Code First allows for custom annotations to be associated with columns and tables in the generated model. This class represents a pair of annotation values in a migration such that when the Code First model changes the old annotation value and the new annotation value can be provided to the migration and used in SQL generation.

Constructors

AnnotationValues(Object, Object)

Creates a new pair of annotation values.

Properties

NewValue

Gets the new value of the annotation, which may be null if the annotation has been deleted.

OldValue

Gets the old value of the annotation, which may be null if the annotation has just been created.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as the default hash function.

Operators

Equality(AnnotationValues, AnnotationValues)

Returns true if both annotation pairs contain the same values, otherwise false.

Inequality(AnnotationValues, AnnotationValues)

Returns true if the two annotation pairs contain different values, otherwise false.

Applies to