Add docs for typed fluent syntax

This commit is contained in:
root
2026-02-27 13:34:16 +01:00
parent 3797505c9c
commit 0afc894fd6
3 changed files with 386 additions and 0 deletions

View File

@@ -52,6 +52,22 @@ using (var query = db.From("users").Where("id", 19).SelectColumn("first"))
}
```
## First Query (Typed Fluent Syntax)
```csharp
using (var db = new DynamicDatabase(SQLiteFactory.Instance, "Data Source=app.db;", options))
{
var cmd = db.FromTyped<User>("u")
.SelectSql(u => u.Col(x => x.Code))
.WhereSql(u => u.Col(x => x.Id).Eq(19));
var value = cmd.ScalarAs<string>();
Console.WriteLine(value);
}
```
For multi-join typed queries, prefer `FromTypedScope(...)`. Full details are documented in [Typed Fluent Syntax](typed-fluent-syntax.md).
## Insert, Update, Delete
```csharp