File tree 2 files changed +3
-4
lines changed
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
- using System ;
2
1
using System . Collections . Generic ;
3
2
using System . Linq ;
4
3
using System . Threading . Tasks ;
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ protected virtual IQueryable<TEntity> ApplySortAndFilterQuery(IQueryable<TEntity
227
227
return entities ;
228
228
}
229
229
230
- protected IQueryable < TEntity > IncludeRelationships ( IQueryable < TEntity > entities , List < string > relationships )
230
+ protected virtual IQueryable < TEntity > IncludeRelationships ( IQueryable < TEntity > entities , List < string > relationships )
231
231
{
232
232
_jsonApiContext . IncludedRelationships = relationships ;
233
233
@@ -241,10 +241,10 @@ private async Task<TResource> GetWithRelationshipsAsync(TId id)
241
241
{
242
242
var query = _entities . Get ( ) . Where ( e => e . Id . Equals ( id ) ) ;
243
243
244
- foreach ( var r in _jsonApiContext . QuerySet . IncludedRelationships )
244
+ _jsonApiContext . QuerySet . IncludedRelationships . ForEach ( r =>
245
245
{
246
246
query = _entities . Include ( query , r ) ;
247
- }
247
+ } ) ;
248
248
249
249
var value = await _entities . FirstOrDefaultAsync ( query ) ;
250
250
You can’t perform that action at this time.
0 commit comments