Skip to content

Commit 91f29c1

Browse files
committed
update readme
1 parent c9e4b3f commit 91f29c1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ services.AddJsonApi(config => {
7676
});
7777
```
7878

79-
The controller **must** implement `IJsonApiController`, and it **may** inherit from `JsonApiController`.
79+
The controller **must** implement `IJsonApiController`, and it **may** inherit from [JsonApiController](https://github.com/Research-Institute/json-api-dotnet-core/blob/master/JsonApiDotNetCore/Controllers/JsonApiController.cs).
8080
Constructor dependency injection will work like normal.
8181
Any services added in your `Startup.ConfigureServices()` method will be injected into the constructor parameters.
8282

@@ -85,7 +85,7 @@ public class TodoItemsController : JsonApiController, IJsonApiController
8585
{
8686
private ApplicationDbContext _dbContext;
8787
88-
public TodoItemsController(JsonApiContext jsonApiContext, ResourceRepository resourceRepository, ApplicationDbContext applicationDbContext)
88+
public TodoItemsController(IJsonApiContext jsonApiContext, ResourceRepository resourceRepository, ApplicationDbContext applicationDbContext)
8989
: base(jsonApiContext, resourceRepository)
9090
{
9191
_dbContext = applicationDbContext;
@@ -98,6 +98,8 @@ public class TodoItemsController : JsonApiController, IJsonApiController
9898
}
9999
```
100100

101+
You can access the HttpContext from [IJsonApiContext](https://github.com/Research-Institute/json-api-dotnet-core/blob/master/JsonApiDotNetCore/Abstractions/IJsonApiContext.cs).
102+
101103

102104
## References
103105
[JsonApi Specification](http://jsonapi.org/)

0 commit comments

Comments
 (0)