Skip to content

Commit

Permalink
batch-operations: add syntax types to code blocks (#336)
Browse files Browse the repository at this point in the history
Co-authored-by: alxndrsn <alxndrsn>
  • Loading branch information
alxndrsn authored Oct 24, 2024
1 parent ba64e2f commit ab378eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Odata-docs/client/batch-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ But since we can't change the internal batch URI to the load balancer URI, we in
### Relative URIs in Batch Queries
We can pass the `SaveChangesOptions.UseRelativeUri` option along with other batch options to `ExecuteBatch` method as follows.

```
```csharp
var batchResponse = dsc.ExecuteBatch(SaveChangesOptions.BatchWithIndependentOperations | SaveChangesOptions.UseRelativeUri, peopleQuery, airlinesQuery);
```
The same options apply to `ExecuteBatchAsync` method.
Expand Down Expand Up @@ -281,12 +281,12 @@ Key attributes for a Json batch request are as follows:
In OData Client, we achieve Json batching by passing `SaveChangesOption.UseJsonBatch` flag when calling `SaveChanges` or `ExecuteBatch` methods.

In `ExecuteBatch`
```
```csharp
var batchResponse = dsc.ExecuteBatch(SaveChangesOptions.BatchWithIndependentOperations | SaveChangesOptions.UseJsonBatch, peopleQuery, airlinesQuery);
```

In `SaveChanges`
```
```csharp
dsc.SaveChanges(SaveChangesOptions.BatchWithSingleChangeset | SaveChangesOptions.UseJsonBatch);
```

Expand Down

0 comments on commit ab378eb

Please sign in to comment.