[]
Used to group massive changes to entities and to allow manual explicit changes of entity states.
public void BulkChanges(Action makeChanges)
Type | Name | Description |
---|---|---|
Action | makeChanges | A delegate that makes changes in entities. |
Internal state of the client-side cache and all existing client views based on the cache
are kept unchanged, aren't updated while the given makeChanges
is executed.
After the delegate completes its execution (having modified multiple entities),
the client-side cache internal state is restored and client views
are updated (maintained) to reflect the changes made in entities during the delegate's execution.
There are two main scenarios where you should consider calling this method:
var scope = clientCache.CreateScope();
clientCache.BulkChanges(delegate {
foreach(var detail in scope.GetItems<Order_Details>)
detail.Discount *= 2;
});