public GetsBaseJsonApiController(
     IJsonApiContext jsonApiContext,
     IResourceQueryService <T, TId> queryService = null)
 {
     _jsonApiContext = jsonApiContext.ApplyContext <T>(this);
     _getAll         = queryService;
     _getById        = queryService;
 }
 public GetsBaseJsonApiController(
     IJsonApiContext jsonApiContext,
     IGetAllService <T, TId> getAll   = null,
     IGetByIdService <T, TId> getById = null)
 {
     _jsonApiContext = jsonApiContext.ApplyContext <T>(this);
     _getAll         = getAll;
     _getById        = getById;
 }
 public GetsBaseJsonApiController(
     IJsonApiContext jsonApiContext,
     IResourceService <T, TId> resourceService)
 {
     _jsonApiContext = jsonApiContext.ApplyContext <T>(this);
     _getAll         = resourceService;
     _getById        = resourceService;
     //_getRelationship = resourceService;
     //_getRelationships = resourceService;
     //_create = resourceService;
     //_update = resourceService;
     //_updateRelationships = resourceService;
     //_delete = resourceService;
 }
Beispiel #4
0
 public void ApplyFakeContext <T>(Controller controller) where T : class, IIdentifiable
 {
     _jsonApiContext.BeginOperation();
     _jsonApiContext.ApplyContext <T>(controller);
 }