EntityCoreTFieldsSetValue Method (Int32, Object, Boolean) |
Sets the EntityField on index fieldIndex to the new value value. Marks also the entityfields as dirty. Will refetch the complete entity's fields
from the database if necessary (i.e. the entity is outofsync.).
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.11.0.0 (5.11.23.1114)
Syntax protected bool SetValue(
int fieldIndex,
Object value,
bool checkForRefetch
)
Protected Function SetValue (
fieldIndex As Integer,
value As Object,
checkForRefetch As Boolean
) As Boolean
Parameters
- fieldIndex
- Type: SystemInt32
Index of EntityField to set the new value of - value
- Type: SystemObject
Value to set - checkForRefetch
- Type: SystemBoolean
If set to true, it will check if this entity is out of sync and will refetch it first if it is, if the
entity is capable of refetching itself.
Return Value
Type:
Booleantrue if the value is actually set, false otherwise.
Exceptions Exception | Condition |
---|
ORMValueTypeMismatchException | The value specified is not of the same IEntityField.DataType as the field. |
ArgumentOutOfRangeException | The value specified has a size that is larger than the maximum size defined for the related column in the database
or the index passed in is not in the fields range of valid indexes. |
See Also