Skip to content

Commit 30c18a1

Browse files
authored
Update README.md
1 parent a95f37a commit 30c18a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@ context.Items.Where(a => a.ItemId > 500).BatchDeleteAsync();
6363

6464
// Update (using Expression arg.) supports Increment/Decrement
6565
context.Items.Where(a => a.ItemId <= 500).BatchUpdate(a => new Item { Quantity = a.Quantity + 100 });
66-
context.Items.Where(a => a.ItemId <= 500).BatchUpdateAsync(a => new Item { Quantity = a.Quantity + 100 });
66+
context.Items.Where(a => a.ItemId <= 500).BatchUpdateAsync(a => new Item { Quantity = a.Quantity + 100});
6767
// can be as value '+100' or as variable '+incrementStep' (int incrementStep = 100;)
6868
6969
// Update (via simple object)
7070
context.Items.Where(a => a.ItemId <= 500).BatchUpdate(new Item { Description = "Updated" });
7171
context.Items.Where(a => a.ItemId <= 500).BatchUpdateAsync(new Item { Description = "Updated" });
7272
// Update (via simple object) - requires additional Argument for setting to Property default value
73-
var updateCols = new List<string> { nameof(Item.Quantity) }; //Update 'Quantity' to default value('0'-zero)
73+
var updateCols = new List<string> { nameof(Item.Quantity) }; // Update 'Quantity' to default value ('0')
7474
var q = context.Items.Where(a => a.ItemId <= 500);
75-
int affected = q.BatchUpdate(new Item { Description="Updated" }, updateCols); //result assigned to variable
75+
int affected = q.BatchUpdate(new Item { Description="Updated" }, updateCols); // result assigned to aff.
7676
7777
// Batch iteration (useful in same cases to avoid lock escalation)
7878
do {

0 commit comments

Comments
 (0)