1.Update
For bulk operations, either update or remove is done using the Lightspeed query object.
Note: Student is the table (entity) to be update, Stuname is the one used in table student for querying
var stuquery = new Query ( typeof (Student), entity.attribute ("stuname") = = "Lao Wang");
This query object is equivalent to a where. The specific SET statement is implemented in the code below.
New );
The age of student, Stuname equals "Lao Wang", is updated to 25.
It is important to note that the above update object is an anonymous type, and an error "Cannot assign <null> to an anonymous type attribute" If a property needs to be updated to null
This requires a class or struct to be hosted. As follows
New NULL }); struct agestruct{ publicintsetget;}}
2.Remove
Bulk deletion is almost the same as a bulk update, except that the last step is to use the Remove method instead of update.
Bulk update and delete for Lightspeed