This project is read-only.

Batch update with variables



I can handle batch updates when the property to update is a constant (for example, Deleted = true) but I find very difficult to achieve a batch update with variables.

Lets say I send a list of entities to my batch update and for every entity I want to update a particular field, for example Price.

I try to do query.Update(x => new Entity() { x.Price = [PRICE OF ENTITY IN LIST] }), but obviously it does not get the Id because is a NEW instance of the entity.

How can I achieve this? If I do a foreach, the performance is terrible.

Thanks in advanced!