preUpdateFieldValues<Dummy.Entities.Dummy2.VehicleStatusEntity>(VHStatusResultSet, currentEntity => currentEntity.MVehicleKey = "RMKL" + Convert.ToString(currentEntity.MIDKey));Example of vfp it replaces:
preUpdateFieldValues("m.vehkey='RMKL'+ALLTRIM(STR(m.vehi2)))")
Note: IBusinessResult is the interface for a collection of entitiespublic Dummy.Entities.Interfaces.IBusinessResult preUpdateFieldValues<TEntityType>(Dummy.Entities.Interfaces.IBusinessResult entityList, Action<TEntityType> replacementFunction) { foreach (TEntityType currentEntity in entityList.Entities) replacementFunction(currentEntity); return entityList; }Example of vfp code it replaces: Replaces the below section (tcFldChgMacro) in preUpdateFieldValues.prg:
LPARAMETERS tcFldChgMacro
….
SCAN
Scatter memvar memo
If !Empty(tcFldChgMacro)
&tcFldChgMacro
Endif
Gather memvar memo
ENDSCAN
…