@@ -67,18 +67,10 @@ public class NoSqlResourceService<TResource, TId> : IResourceService<TResource,
6767 private readonly TraceLogWriter < NoSqlResourceService < TResource , TId > > _traceWriter ;
6868 private readonly JsonApiResourceService < TResource , TId > _resourceService ;
6969
70- public NoSqlResourceService (
71- IResourceRepositoryAccessor repositoryAccessor ,
72- IQueryLayerComposer sqlQueryLayerComposer ,
73- IPaginationContext paginationContext ,
74- IJsonApiOptions options ,
75- ILoggerFactory loggerFactory ,
76- IJsonApiRequest request ,
77- IResourceChangeTracker < TResource > resourceChangeTracker ,
78- IResourceDefinitionAccessor resourceDefinitionAccessor ,
79- INoSqlQueryLayerComposer queryLayerComposer ,
80- IResourceGraph resourceGraph ,
81- IEvaluatedIncludeCache evaluatedIncludeCache )
70+ public NoSqlResourceService ( IResourceRepositoryAccessor repositoryAccessor , IQueryLayerComposer sqlQueryLayerComposer ,
71+ IPaginationContext paginationContext , IJsonApiOptions options , ILoggerFactory loggerFactory , IJsonApiRequest request ,
72+ IResourceChangeTracker < TResource > resourceChangeTracker , IResourceDefinitionAccessor resourceDefinitionAccessor ,
73+ INoSqlQueryLayerComposer queryLayerComposer , IResourceGraph resourceGraph , IEvaluatedIncludeCache evaluatedIncludeCache )
8274 {
8375 _repositoryAccessor = repositoryAccessor ;
8476 _paginationContext = paginationContext ;
@@ -193,10 +185,7 @@ public async Task<TResource> GetAsync(TId id, CancellationToken cancellationToke
193185 }
194186
195187 /// <inheritdoc />
196- public Task AddToToManyRelationshipAsync (
197- TId primaryId ,
198- string relationshipName ,
199- ISet < IIdentifiable > secondaryResourceIds ,
188+ public Task AddToToManyRelationshipAsync ( TId primaryId , string relationshipName , ISet < IIdentifiable > secondaryResourceIds ,
200189 CancellationToken cancellationToken )
201190 {
202191 return _resourceService . AddToToManyRelationshipAsync ( primaryId , relationshipName , secondaryResourceIds , cancellationToken ) ;
@@ -263,10 +252,7 @@ public Task DeleteAsync(TId id, CancellationToken cancellationToken)
263252 }
264253
265254 /// <inheritdoc />
266- public async Task RemoveFromToManyRelationshipAsync (
267- TId leftId ,
268- string relationshipName ,
269- ISet < IIdentifiable > rightResourceIds ,
255+ public async Task RemoveFromToManyRelationshipAsync ( TId leftId , string relationshipName , ISet < IIdentifiable > rightResourceIds ,
270256 CancellationToken cancellationToken )
271257 {
272258 _traceWriter . LogMethodStart ( new
@@ -329,9 +315,7 @@ protected async Task<TResource> GetPrimaryResourceByIdAsync(TId id, Cancellation
329315 /// <returns>
330316 /// The primary resource with navigation properties populated where such properties represent included resources.
331317 /// </returns>
332- protected async Task < TResource > GetPrimaryResourceByIdWithConstraintsAsync (
333- TId id ,
334- TopFieldSelection fieldSelection ,
318+ protected async Task < TResource > GetPrimaryResourceByIdWithConstraintsAsync ( TId id , TopFieldSelection fieldSelection ,
335319 CancellationToken cancellationToken )
336320 {
337321 AssertPrimaryResourceTypeInJsonApiRequestIsNotNull ( _request . PrimaryResourceType ) ;
@@ -397,9 +381,7 @@ await GetIncludedElementsAsync(new[]
397381 /// <returns>
398382 /// A <see cref="Task" /> representing the asynchronous operation.
399383 /// </returns>
400- protected virtual async Task GetIncludedElementsAsync (
401- IReadOnlyCollection < IIdentifiable > primaryResources ,
402- IncludeExpression includeExpression ,
384+ protected virtual async Task GetIncludedElementsAsync ( IReadOnlyCollection < IIdentifiable > primaryResources , IncludeExpression includeExpression ,
403385 CancellationToken cancellationToken )
404386 {
405387 _evaluatedIncludeCache . Set ( includeExpression ) ;
@@ -429,10 +411,8 @@ protected virtual async Task GetIncludedElementsAsync(
429411 /// <returns>
430412 /// A <see cref="Task" /> representing the asynchronous operation.
431413 /// </returns>
432- protected virtual async Task GetIncludedElementAsync (
433- IReadOnlyCollection < IIdentifiable > primaryResources ,
434- IncludeElementExpression includeElementExpression ,
435- CancellationToken cancellationToken )
414+ protected virtual async Task GetIncludedElementAsync ( IReadOnlyCollection < IIdentifiable > primaryResources ,
415+ IncludeElementExpression includeElementExpression , CancellationToken cancellationToken )
436416 {
437417 if ( includeElementExpression . Children . Any ( ) )
438418 {
@@ -479,10 +459,7 @@ protected virtual async Task GetIncludedElementAsync(
479459 /// For to-many relationships, an <see cref="IReadOnlyCollection{T}" /> of <see cref="IIdentifiable" />; for to-one relationships, an
480460 /// <see cref="IIdentifiable" /> or <see langword="null" />.
481461 /// </returns>
482- protected async Task < object ? > GetSecondaryAsync (
483- IIdentifiable primaryResource ,
484- string relationshipName ,
485- ResourceKind resourceKind ,
462+ protected async Task < object ? > GetSecondaryAsync ( IIdentifiable primaryResource , string relationshipName , ResourceKind resourceKind ,
486463 CancellationToken cancellationToken )
487464 {
488465 // Get the HasMany or HasOne attribute corresponding to the given relationship name.
@@ -576,12 +553,8 @@ protected virtual async Task GetIncludedElementAsync(
576553 /// <returns>
577554 /// The <see cref="IIdentifiable" />, if it exists, or <see langword="null" />.
578555 /// </returns>
579- protected async Task < IIdentifiable ? > GetOneSecondaryResourceAsync (
580- ResourceType resourceType ,
581- string propertyName ,
582- string ? propertyValue ,
583- ResourceKind resourceKind ,
584- CancellationToken cancellationToken )
556+ protected async Task < IIdentifiable ? > GetOneSecondaryResourceAsync ( ResourceType resourceType , string propertyName , string ? propertyValue ,
557+ ResourceKind resourceKind , CancellationToken cancellationToken )
585558 {
586559 if ( propertyValue is null )
587560 {
@@ -614,12 +587,8 @@ protected virtual async Task GetIncludedElementAsync(
614587 /// <returns>
615588 /// The potentially empty collection of secondary resources.
616589 /// </returns>
617- protected async Task < IReadOnlyCollection < IIdentifiable > > GetManySecondaryResourcesAsync (
618- ResourceType resourceType ,
619- string propertyName ,
620- string propertyValue ,
621- ResourceKind resourceKind ,
622- CancellationToken cancellationToken )
590+ protected async Task < IReadOnlyCollection < IIdentifiable > > GetManySecondaryResourcesAsync ( ResourceType resourceType , string propertyName ,
591+ string propertyValue , ResourceKind resourceKind , CancellationToken cancellationToken )
623592 {
624593 bool isIncluded = resourceKind == ResourceKind . Included ;
625594 var ( queryLayer , include ) = _queryLayerComposer . ComposeFromConstraintsForNoSql ( resourceType , propertyName , propertyValue , isIncluded ) ;
0 commit comments