Skip to content

Commit 41b0415

Browse files
committed
make private service methods protected virtual
1 parent 906c697 commit 41b0415

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/JsonApiDotNetCore/JsonApiDotNetCore.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<VersionPrefix>2.2.1</VersionPrefix>
3+
<VersionPrefix>2.2.2</VersionPrefix>
44
<TargetFrameworks>$(NetStandardVersion)</TargetFrameworks>
55
<AssemblyName>JsonApiDotNetCore</AssemblyName>
66
<PackageId>JsonApiDotNetCore</PackageId>
@@ -35,4 +35,4 @@
3535
<PackageReference Include="docfx.console" Version="2.33.0" />
3636
</ItemGroup>
3737

38-
</Project>
38+
</Project>

src/JsonApiDotNetCore/Services/EntityResourceService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public virtual async Task<bool> DeleteAsync(TId id)
146146
return await _entities.DeleteAsync(id);
147147
}
148148

149-
private IQueryable<T> ApplySortAndFilterQuery(IQueryable<T> entities)
149+
protected virtual IQueryable<T> ApplySortAndFilterQuery(IQueryable<T> entities)
150150
{
151151
var query = _jsonApiContext.QuerySet;
152152

@@ -163,7 +163,7 @@ private IQueryable<T> ApplySortAndFilterQuery(IQueryable<T> entities)
163163
return entities;
164164
}
165165

166-
private async Task<IEnumerable<T>> ApplyPageQueryAsync(IQueryable<T> entities)
166+
protected virtual async Task<IEnumerable<T>> ApplyPageQueryAsync(IQueryable<T> entities)
167167
{
168168
var pageManager = _jsonApiContext.PageManager;
169169
if (!pageManager.IsPaginated)
@@ -174,7 +174,7 @@ private async Task<IEnumerable<T>> ApplyPageQueryAsync(IQueryable<T> entities)
174174
return await _entities.PageAsync(entities, pageManager.PageSize, pageManager.CurrentPage);
175175
}
176176

177-
private IQueryable<T> IncludeRelationships(IQueryable<T> entities, List<string> relationships)
177+
protected virtual IQueryable<T> IncludeRelationships(IQueryable<T> entities, List<string> relationships)
178178
{
179179
_jsonApiContext.IncludedRelationships = relationships;
180180

0 commit comments

Comments
 (0)