@@ -407,23 +407,23 @@ The second argument lets you specify a filter for updates:
407407db .UpdateOnly (() => new Person { FirstName = " JJ" }, where : p => p .LastName == " Hendrix" );
408408```
409409
410- Alternatively you can pass in a POCO directly, in which case the first expression in an ` UpdateOnly `
410+ Alternatively you can pass in a POCO directly, in which case the first expression in an ` UpdateOnlyFields `
411411statement is used to specify which fields should be updated:
412412
413413``` csharp
414- db .UpdateOnly (new Person { FirstName = " JJ" }, onlyFields : p => p .FirstName );
414+ db .UpdateOnlyFields (new Person { FirstName = " JJ" }, onlyFields : p => p .FirstName );
415415
416- db .UpdateOnly (new Person { FirstName = " JJ" , Age = 12 },
416+ db .UpdateOnlyFields (new Person { FirstName = " JJ" , Age = 12 },
417417 onlyFields : p => new { p .FirstName , p .Age });
418418
419- db .UpdateOnly (new Person { FirstName = " JJ" , Age = 12 },
419+ db .UpdateOnlyFields (new Person { FirstName = " JJ" , Age = 12 },
420420 onlyFields : p => new [] { " Name" , " Age" });
421421```
422422
423423When present, the second expression is used as the where filter:
424424
425425``` csharp
426- db .UpdateOnly (new Person { FirstName = " JJ" },
426+ db .UpdateOnlyFields (new Person { FirstName = " JJ" },
427427 onlyFields : p => p .FirstName ,
428428 where : p => p .LastName == " Hendrix" );
429429```
@@ -433,7 +433,7 @@ Instead of using the expression filters above you can choose to use an SqlExpres
433433var q = db .From <Person >()
434434 .Update (p => p .FirstName );
435435
436- db .UpdateOnly (new Person { FirstName = " JJ" , LastName = " Hendo" }, onlyFields : q );
436+ db .UpdateOnlyFields (new Person { FirstName = " JJ" , LastName = " Hendo" }, onlyFields : q );
437437```
438438
439439Using an Object Dictionary:
@@ -443,7 +443,7 @@ var updateFields = new Dictionary<string,object> {
443443 [nameof (Person .FirstName )] = " JJ" ,
444444};
445445
446- db .UpdateOnly <Person >(updateFields , p => p .LastName == " Hendrix" );
446+ db .UpdateOnlyFields <Person >(updateFields , p => p .LastName == " Hendrix" );
447447```
448448
449449Using a typed SQL Expression:
@@ -453,7 +453,7 @@ var q = db.From<Person>()
453453 .Where (x => x .FirstName == " Jimi" )
454454 .Update (p => p .FirstName );
455455
456- db .UpdateOnly (new Person { FirstName = " JJ" }, onlyFields : q );
456+ db .UpdateOnlyFields (new Person { FirstName = " JJ" }, onlyFields : q );
457457```
458458
459459### Updating existing values
0 commit comments