Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit cf17ebc

Browse files
committed
Update docs to use SqlFmt
1 parent f004935 commit cf17ebc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -446,17 +446,17 @@ db.UpdateOnly(new Person { FirstName = "JJ" },
446446
```
447447
**UPDATE "Person" SET "FirstName" = 'JJ' WHERE ("LastName" = 'Hendrix')**
448448

449-
For the ultimate flexibility we also provide un-typed, string-based expressions. Use the `.Params()` extension method escape parameters (inspired by [massive](https://github.com/robconery/massive)):
449+
For the ultimate flexibility we also provide un-typed, string-based expressions. Use the `.SqlFmt()` extension method escape parameters (inspired by [massive](https://github.com/robconery/massive)):
450450

451451
```csharp
452-
db.UpdateFmt<Person>(set: "FirstName = {0}".Params("JJ"),
453-
where: "LastName = {0}".Params("Hendrix"));
452+
db.UpdateFmt<Person>(set: "FirstName = {0}".SqlFmt("JJ"),
453+
where: "LastName = {0}".SqlFmt("Hendrix"));
454454
```
455455
Even the Table name can be a string so you perform the same update without requiring the Person model at all:
456456

457457
```csharp
458-
db.UpdateFmt(table: "Person", set: "FirstName = {0}".Params("JJ"),
459-
where: "LastName = {0}".Params("Hendrix"));
458+
db.UpdateFmt(table: "Person", set: "FirstName = {0}".SqlFmt("JJ"),
459+
where: "LastName = {0}".SqlFmt("Hendrix"));
460460
```
461461
**UPDATE "Person" SET FirstName = 'JJ' WHERE LastName = 'Hendrix'**
462462

@@ -492,12 +492,12 @@ db.Delete<Person>(q => q.Where(p => p.Age == 27));
492492

493493
As well as un-typed, string-based expressions:
494494
```csharp
495-
db.Delete<Person>(where: "Age = {0}".Params(27));
495+
db.Delete<Person>(where: "Age = {0}".SqlFmt(27));
496496
```
497497

498498
Which also can take a table name so works without requiring a typed **Person** model
499499
```csharp
500-
db.Delete(table: "Person", where: "Age = {0}".Params(27));
500+
db.Delete(table: "Person", where: "Age = {0}".SqlFmt(27));
501501
```
502502

503503
**DELETE FROM "Person" WHERE Age = 27**

0 commit comments

Comments
 (0)