Update ... Set inventoryElement.StockQuantity = inventoryElement.StockQuantity +value
Frans do you have a C# example of this kind of Expression for use with UpdateEntitiesDirectly?
[edit]Its okay I found it:
// C#
IExpression updateExpression = new Expression(
EmployeeFields.Salary, ExOp.Add,
new Expression(EmployeeFields.Salary, ExOp.Mul, 0.1f)));
EmployeeEntity employee = new EmployeeEntity();
employee.Fields[(int)EmployeeFieldIndex.Salary].ExpressionToApply = updateExpression;
DataAccessAdapter adapter = new DataAccessAdapter();
// no filter is specified, everybody gets 10% extra, but you could of course
// specify a filter to limit the scope of the update.
adapter.UpdateEntitiesDirectly(employee, null);
// the expression declaration can also be done like this:
EmployeeEntity employee = new EmployeeEntity();
employee.Fields[(int)EmployeeFieldIndex.Salary].ExpressionToApply =
(EmployeeFields.Salary + (EmployeeFields.Salary * 0.01f));