Thanks for the quick reply,
In my case, I have a productStore entity.
When I sale a product, the saled amount have to be fewer than the stored amount in the productStore, ie. the ProductStore.Amount has to be greater than 0.
For the perfomance reason I don't want to fetch the product entity, but set the amount via UpdateEntitiesDirectly, but how can I control the amount in the productStore via field expression?
Dim store As New ProductSoreEntity()
store.Fields(CInt(storeFieldIndex.Amount)).ExpressionToApply = storeFields.Amount - saledAmount
Is it any mode, to compare the ProductStore.amount to the saledAmount, and execute the update query only, when the SaledAmount<ProductStore.Amount?
Thanks
Gabor