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)
Syntaxprotected virtual Func<Object, Object, bool> GetFieldValueComparer(
int fieldIndex
)
Protected Overridable Function GetFieldValueComparer (
fieldIndex As Integer
) As Func(Of Object, Object, Boolean)
Parameters
- fieldIndex
- Type: SystemInt32
Return Value
Type:
FuncObject,
Object,
BooleanA 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