Skip to content

Commit

Permalink
rename parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
lvchkn committed Aug 20, 2023
1 parent 34e6e81 commit 398c2a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Application/Stories/IStoriesRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public interface IStoriesRepository
Task<Story?> GetByIdAsync(int id);
Task<List<Story>> GetByAuthorAsync(string author);
Task<List<Story>> GetAllAsync();
List<Story> GetAll(IEnumerable<SortingParameters> sortingParameters, string? search, int skip, int top);
List<Story> GetAll(IEnumerable<SortingParameters> sortingParameters, string? search, int skip, int take);
Task AddAsync(Story story);
Task UpdateAsync(int id, Story updatedStory);
Task DeleteAsync(int id);
Expand Down
4 changes: 2 additions & 2 deletions Infrastructure/Db/Repositories/StoriesRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public async Task<List<Story>> GetAllAsync()
return stories;
}

public List<Story> GetAll(IEnumerable<SortingParameters> sortingParameters, string? search, int skip, int top)
public List<Story> GetAll(IEnumerable<SortingParameters> sortingParameters, string? search, int skip, int take)
{
var included = _dbContext.Stories
.AsNoTracking()
Expand All @@ -75,7 +75,7 @@ public List<Story> GetAll(IEnumerable<SortingParameters> sortingParameters, stri
.Sort(filteredStories, sortingParameters)
.OrderByDescending(s => s.Time)
.Skip(skip)
.Take(top)
.Take(take)
.ToList();

return sortedStories;
Expand Down

0 comments on commit 398c2a7

Please sign in to comment.