File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using JsonApiDotNetCore . Configuration ;
3+ using JsonApiDotNetCore . Routing ;
4+ using Microsoft . AspNetCore . Http ;
5+
6+ namespace JsonApiDotNetCore . Abstractions
7+ {
8+ public interface IJsonApiContext
9+ {
10+ JsonApiModelConfiguration Configuration { get ; }
11+ object DbContext { get ; }
12+ HttpContext HttpContext { get ; }
13+ Route Route { get ; }
14+ string GetEntityName ( ) ;
15+ Type GetEntityType ( ) ;
16+ Type GetJsonApiResourceType ( ) ;
17+ }
18+ }
Original file line number Diff line number Diff line change 77
88namespace JsonApiDotNetCore . Abstractions
99{
10- public class JsonApiContext
10+ public class JsonApiContext : IJsonApiContext
1111 {
1212 public HttpContext HttpContext { get ; }
1313 public Route Route { get ; }
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ namespace JsonApiDotNetCore.Controllers
88{
99 public class JsonApiController : IJsonApiController
1010 {
11- protected readonly JsonApiContext JsonApiContext ;
11+ protected readonly IJsonApiContext JsonApiContext ;
1212 private readonly ResourceRepository _resourceRepository ;
1313
14- public JsonApiController ( JsonApiContext jsonApiContext , ResourceRepository resourceRepository )
14+ public JsonApiController ( IJsonApiContext jsonApiContext , ResourceRepository resourceRepository )
1515 {
1616 JsonApiContext = jsonApiContext ;
1717 _resourceRepository = resourceRepository ;
You can’t perform that action at this time.
0 commit comments