File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1- using System ;
21using System . Collections . Generic ;
32using System . Linq ;
43using System . Threading . Tasks ;
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ protected virtual IQueryable<TEntity> ApplySortAndFilterQuery(IQueryable<TEntity
227227 return entities ;
228228 }
229229
230- protected IQueryable < TEntity > IncludeRelationships ( IQueryable < TEntity > entities , List < string > relationships )
230+ protected virtual IQueryable < TEntity > IncludeRelationships ( IQueryable < TEntity > entities , List < string > relationships )
231231 {
232232 _jsonApiContext . IncludedRelationships = relationships ;
233233
@@ -241,10 +241,10 @@ private async Task<TResource> GetWithRelationshipsAsync(TId id)
241241 {
242242 var query = _entities . Get ( ) . Where ( e => e . Id . Equals ( id ) ) ;
243243
244- foreach ( var r in _jsonApiContext . QuerySet . IncludedRelationships )
244+ _jsonApiContext . QuerySet . IncludedRelationships . ForEach ( r =>
245245 {
246246 query = _entities . Include ( query , r ) ;
247- }
247+ } ) ;
248248
249249 var value = await _entities . FirstOrDefaultAsync ( query ) ;
250250
You can’t perform that action at this time.
0 commit comments