FieldUtilitiesDetermineIfFieldShouldBeSet Method (Boolean, Object, Object, Boolean, Object, FuncObject, Object, Boolean) |
Determines if the field should be set to the value passed in.
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.12.0.0 (5.12.0)
Syntaxpublic static bool DetermineIfFieldShouldBeSet(
bool fieldIsChanged,
Object currentValue,
Object dbValue,
bool entityIsNew,
Object value,
Func<Object, Object, bool> comparer
)
Public Shared Function DetermineIfFieldShouldBeSet (
fieldIsChanged As Boolean,
currentValue As Object,
dbValue As Object,
entityIsNew As Boolean,
value As Object,
comparer As Func(Of Object, Object, Boolean)
) As Boolean
Parameters
- fieldIsChanged
- Type: SystemBoolean
if set to true [field is changed]. - currentValue
- Type: SystemObject
The current value. - dbValue
- Type: SystemObject
The db value. - entityIsNew
- Type: SystemBoolean
if [entity is new]; otherwise, . - value
- Type: SystemObject
Value. - comparer
- Type: SystemFuncObject, Object, Boolean
The comparer function to use. Receives 2 arguments to compare and returns true if the arguments are equal and false otherwise. By default, it
receives (a, b) => ValuesAreEqual(a, b). Can't be null
Return Value
Type:
Boolean
true if the field should be set with the value, false otherwise
See Also