Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions docs/documents/querying/linq/include.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,7 @@ public async Task include_to_dictionary_list()
<sup><a href='https://github.com/JasperFx/marten/blob/master/src/LinqTests/Includes/end_to_end_query_with_include.cs#L972-L1005' title='Snippet source file'>snippet source</a> | <a href='#snippet-sample_dictionary_list_include' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

## 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):

Expand Down
11 changes: 0 additions & 11 deletions docs/documents/querying/sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,6 @@ var millers2 = await session
<sup><a href='https://github.com/JasperFx/marten/blob/master/src/Marten.Testing/Examples/QueryBySql.cs#L20-L29' title='Snippet source file'>snippet source</a> | <a href='#snippet-sample_query_with_sql_and_parameters' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

And finally asynchronously:

<!-- snippet: sample_query_with_sql_async -->
<a id='snippet-sample_query_with_sql_async'></a>
```cs
var millers = await session
.QueryAsync<User>("where data ->> 'LastName' = ?", "Miller");
```
<sup><a href='https://github.com/JasperFx/marten/blob/master/src/Marten.Testing/Examples/QueryBySql.cs#L34-L39' title='Snippet source file'>snippet source</a> | <a href='#snippet-sample_query_with_sql_async' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

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:
Expand Down
9 changes: 1 addition & 8 deletions documentation/documentation/documents/querying/include.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]>:

Expand Down
11 changes: 0 additions & 11 deletions src/Marten.Testing/Examples/QueryBySql.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<User>("where data ->> 'LastName' = ?", "Miller");

#endregion
}

}
Loading