File tree Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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.
You can’t perform that action at this time.
0 commit comments