From db5d13e8f3258772d2739caf9ffdb55e75a34753 Mon Sep 17 00:00:00 2001 From: Anne Erdtsieck Date: Thu, 16 Oct 2025 14:28:12 +0200 Subject: [PATCH] Removed some redundant async support remarks in the docs --- docs/documents/querying/linq/include.md | 9 +-------- docs/documents/querying/sql.md | 11 ----------- .../documentation/documents/querying/include.md | 9 +-------- src/Marten.Testing/Examples/QueryBySql.cs | 11 ----------- 4 files changed, 2 insertions(+), 38 deletions(-) diff --git a/docs/documents/querying/linq/include.md b/docs/documents/querying/linq/include.md index 4a17e67b57..0b6b4e103c 100644 --- a/docs/documents/querying/linq/include.md +++ b/docs/documents/querying/linq/include.md @@ -224,14 +224,7 @@ public async Task include_to_dictionary_list() snippet source | anchor -## Asynchronous Support - -Marten supports Include within an asynchronous context. The query will be run asynchronously when you append your query with the corresponding Async method, like: - -* `ToListAsync()` -* `SingleAsync()` - -And so on... +## Batched query Support Marten also supports running an Include query within [batched queries](/documents/querying/batched-queries): diff --git a/docs/documents/querying/sql.md b/docs/documents/querying/sql.md index b20967377e..2a10bb4562 100644 --- a/docs/documents/querying/sql.md +++ b/docs/documents/querying/sql.md @@ -33,17 +33,6 @@ var millers2 = await session snippet source | anchor -And finally asynchronously: - - - -```cs -var millers = await session - .QueryAsync("where data ->> 'LastName' = ?", "Miller"); -``` -snippet source | anchor - - All of the samples so far are selecting the whole `User` document and merely supplying a SQL `WHERE` clause, but you can also invoke scalar functions or SQL transforms against a document body, but in that case you will need to supply the full SQL statement like this: diff --git a/documentation/documentation/documents/querying/include.md b/documentation/documentation/documents/querying/include.md index 7c05e8f767..6ad4f1a65e 100644 --- a/documentation/documentation/documents/querying/include.md +++ b/documentation/documentation/documents/querying/include.md @@ -31,14 +31,7 @@ Marten supports chaining other linq methods to allow more complex quries such as * `OrderBy()` * `OrderByDescending()` -## Asynchronous Support - -Marten supports Include within an asynchronous context. The query will be run asynchronously when you append your query with the corresponding Async method, like: - -* `ToListAsync()` -* `SingleAsync()` - -And so on... +## Batched query Support Marten also supports running an Include query within <[linkto:documentation/documents/querying/batched_queries]>: diff --git a/src/Marten.Testing/Examples/QueryBySql.cs b/src/Marten.Testing/Examples/QueryBySql.cs index 258936f631..0630f0e3e9 100644 --- a/src/Marten.Testing/Examples/QueryBySql.cs +++ b/src/Marten.Testing/Examples/QueryBySql.cs @@ -28,15 +28,4 @@ public async Task QueryWithParameters(IQuerySession session) #endregion } - - public async Task QueryAsynchronously(IQuerySession session) - { - #region sample_query_with_sql_async - - var millers = await session - .QueryAsync("where data ->> 'LastName' = ?", "Miller"); - - #endregion - } - }