Skip to content

Conversation

@magicxor
Copy link
Owner

@magicxor magicxor commented Dec 1, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 1, 2025 07:28
@magicxor magicxor self-assigned this Dec 1, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the codebase to use a more concise syntax for creating OrderByItem instances by leveraging a new constructor and implicit string conversion operator.

Key Changes:

  • Added a constructor to OrderByItem that accepts field name and optional direction parameters
  • Updated all usages to use the shorter syntax: new(field, direction) instead of object initializer syntax
  • Leveraged implicit string-to-OrderByItem conversion where only ascending order is needed

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Hikkaba.Paging/Models/OrderByItem.cs Added parameterized constructor and made Field property required to support concise initialization
Hikkaba.Web/Controllers/Mvc/PostController.cs Updated OrderByItem creation to use new constructor syntax
Hikkaba.Web/Controllers/Mvc/HomeController.cs Updated to use constructor syntax and implicit string conversion for simpler cases
Hikkaba.Web/Controllers/Mvc/CategoryController.cs Refactored OrderByItem initialization to use constructor syntax
Hikkaba.Web/Controllers/Mvc/Admin/BanAdminController.cs Updated to use shorter constructor-based syntax
Hikkaba.Tests.Integration/Tests/Repositories/Post/ListThreadPostsTests.cs Simplified test setup using implicit string conversion for ascending order
Hikkaba.Paging.Tests.Unit/OrderByProjectionConfiguratorTests/AppendTests.cs Updated test cases to use implicit string conversion
Hikkaba.Paging.Tests.Unit/FilterTests/SkipBasedPagingFilterTests.cs Simplified OrderByItem creation in tests
Hikkaba.Paging.Tests.Unit/FilterTests/PageBasedPagingFilterTests.cs Updated to use collection expression with implicit conversion

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@magicxor magicxor merged commit f4ea362 into master Dec 1, 2025
4 checks passed
@magicxor magicxor deleted the feature/add-orderByItem-constructor branch December 1, 2025 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants