Add docs for typed fluent syntax
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user