Skip to content

Commit 2d5f203

Browse files
committed
chore(*): bump project version and document usage
1 parent 7e438bf commit 2d5f203

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

couscous.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,10 @@ menu:
110110
relativeUrl: entityrepositories.html
111111
middleware:
112112
text: Middleware
113-
relativeUrl: middleware.html
113+
relativeUrl: middleware.html
114+
extensions:
115+
name: Spec Extensions
116+
items:
117+
operations:
118+
text: Operations
119+
relativeUrl: operations.html

docs/Operations.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
currentMenu: operations
3+
---
4+
5+
# Operations
6+
7+
Operations is currently an unofficial proposal. It allows you to perform bulk operations in a single transaction.
8+
9+
### Enabling
10+
11+
To enable the operations extension, modify you `Startup.ConfigureServices` method:
12+
13+
```csharp
14+
services.AddJsonApi<AppDbContext>(opt => opt.EnableExtension(JsonApiExtension.Operations));
15+
```
16+
17+
### Controllers
18+
19+
To create a bulk operations controller, inherit `JsonApiOperationsController`:
20+
21+
```csharp
22+
[Route("api/bulk")]
23+
public class OperationsController : JsonApiOperationsController
24+
{
25+
public OperationsController(IOperationsProcessor processor)
26+
: base(processor)
27+
{ }
28+
}
29+
```
30+
31+
### Example
32+
33+
There is a working example in the `/src/examples/OperationsExample` directory of the repository.

0 commit comments

Comments
 (0)