Skip to content

Commit 6429275

Browse files
author
Bart Koelman
committed
Corrected invalid example in documentation
1 parent 54775fb commit 6429275

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/usage/extensibility/controllers.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,18 @@ public class ArticlesController : BaseJsonApiController<Article>
8888

8989
## Implicit Access By Service Injection
9090

91-
Finally, you can control the allowed methods by supplying only the available service implementations. In some cases, resources may be an aggregation of entities or a view on top of the underlying entities. In these cases, there may not be a writable IResourceService implementation, so simply inject the implementation that is available.
91+
Finally, you can control the allowed methods by supplying only the available service implementations. In some cases, resources may be an aggregation of entities or a view on top of the underlying entities. In these cases, there may not be a writable `IResourceService` implementation, so simply inject the implementation that is available.
9292

9393
As with the ActionFilter attributes, if a service implementation is not available to service a request, HTTP 405 Method Not Allowed will be returned.
9494

95-
For more information about resource injection, see the next section titled Resource Services.
95+
For more information about resource service injection, see [Replacing injected services](~/usage/extensibility/layer-overview.md#replacing-injected-services) and [Resource Services](~/usage/extensibility/services.md).
9696

9797
```c#
9898
public class ReportsController : BaseJsonApiController<Report>
9999
{
100100
public ReportsController(IJsonApiOptions options, ILoggerFactory loggerFactory,
101-
IResourceService<Report> resourceService)
102-
: base(options, loggerFactory, resourceService)
101+
IGetAllService<Report> getAllService)
102+
: base(options, loggerFactory, getAllService)
103103
{
104104
}
105105

src/Examples/ReportsExample/Controllers/ReportsController.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ namespace ReportsExample.Controllers
1212
[Route("api/[controller]")]
1313
public class ReportsController : BaseJsonApiController<Report>
1414
{
15-
public ReportsController(IJsonApiOptions options, ILoggerFactory loggerFactory, IGetAllService<Report> getAll)
16-
: base(options, loggerFactory, getAll)
15+
public ReportsController(IJsonApiOptions options, ILoggerFactory loggerFactory, IGetAllService<Report> getAllService)
16+
: base(options, loggerFactory, getAllService)
1717
{
1818
}
1919

0 commit comments

Comments
 (0)