Skip to content

Commit e29157f

Browse files
committed
tweak code
1 parent bafe8ff commit e29157f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

MyApp/_posts/2025-10-20_ormlite-async-task-builder.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,22 @@ in parallel, which looks like:
8181

8282
```csharp
8383
var results = await DbFactory.AsyncDbTasksBuilder()
84-
.Add(db => db.SelectAsync<Rockstar>())
8584
.Add(db => db.SelectAsync<Album>())
86-
.Add(db => db.SelectAsync<Department>())
85+
.Add(db => db.SelectAsync<Rockstar>())
8786
.Add(db => db.SelectAsync<Employee>())
87+
.Add(db => db.SelectAsync<Department>())
8888
.RunAsync();
89-
var (rockstars, albums, departments, employees) = results;
89+
var (albums, rockstars, employees, departments) = results;
9090
```
9191

9292
Which just like TypeScript's destructuring returns a positionally typed tuple of the results which can be destructured back
9393
into their typed variables, e.g:
9494

9595
```csharp
96-
(List<Rockstar> rockstars,
97-
List<Album> albums,
98-
List<Department> departments,
99-
List<Employee> employees) = results;
96+
(List<Album> albums,
97+
List<Rockstar> rockstars,
98+
List<Employee> employees,
99+
List<Department> departments) = results;
100100
```
101101

102102
### Supports up to 8 Tasks
@@ -155,3 +155,4 @@ catch (Exception e)
155155
throw;
156156
}
157157
```
158+

0 commit comments

Comments
 (0)