Click or drag to resize

EntityCoreTFieldsGetFieldValueComparer Method

Returns the field value comparer function to use for value comparisons for the field with fieldIndex.

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.12.0.0 (5.12.0)
Syntax
protected virtual Func<Object, Object, bool> GetFieldValueComparer(
	int fieldIndex
)

Parameters

fieldIndex
Type: SystemInt32

Return Value

Type: FuncObject, Object, Boolean
A lambda which receives two arguments, a and b, and which returns true if the value of a is equal to the value of b, and which returns false otherwise
Remarks
Used in SetValue. By default this method returns a call to FieldUtilities.ValuesAreEqual(a, b) which will perform an a.Equals(b) for normal values and comparing values of two arrays if the field's type is an array type. If your field requires a different comparison to compare values (e.g. DateTimeOffset typed fields might require a call to EqualsExact instead of Equals), override this method and provide a different lambda.
See Also