Skip to content

Conversation

@yilmaztayfun
Copy link
Contributor

@yilmaztayfun yilmaztayfun commented Dec 1, 2025

Pagination-related classes and interfaces were moved to more appropriate projects and namespaces for better separation of concerns. References and using statements were updated accordingly to reflect these changes.

Summary by Sourcery

Refactor pagination types and link generation into more appropriate projects and namespaces.

Enhancements:

  • Move HATEOAS pagination link generator interfaces and implementations into the ASP.NET Core layer and update dependency injection registrations.
  • Relocate core pagination models (paged list types and pagination links) into the shared core namespace for reuse across application and domain layers.
  • Adjust application service contracts and using directives to reference the new pagination namespaces.

Summary by CodeRabbit

  • Refactor
    • Internal code reorganization: restructured pagination components within the framework architecture for improved code organization and maintainability. No changes to user-facing functionality or behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

Pagination-related classes and interfaces were moved to more appropriate projects and namespaces for better separation of concerns. References and using statements were updated accordingly to reflect these changes.
@yilmaztayfun yilmaztayfun requested review from a team as code owners December 1, 2025 23:07
@yilmaztayfun yilmaztayfun requested review from ukaratas and removed request for a team December 1, 2025 23:07
@sourcery-ai
Copy link

sourcery-ai bot commented Dec 1, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Refactors pagination types by relocating core pagination models into a core namespace and moving ASP.NET-specific pagination link generation into an ASP.NET Core namespace, updating namespaces and DI registrations accordingly.

Class diagram for refactored pagination types and namespaces

classDiagram
class AspNetCore_Pagination_IPaginationLinkGenerator {
  <<interface>>
}

class AspNetCore_Pagination_PaginationLinkGenerator {
}

class Core_Pagination_PagedList {
}

class Core_Pagination_HateoasPagedList {
}

class Core_Pagination_PaginationLinks {
}

AspNetCore_Pagination_PaginationLinkGenerator ..|> AspNetCore_Pagination_IPaginationLinkGenerator
AspNetCore_Pagination_PaginationLinkGenerator --> Core_Pagination_PaginationLinks
AspNetCore_Pagination_PaginationLinkGenerator --> Core_Pagination_HateoasPagedList
Loading

File-Level Changes

Change Details Files
Move ASP.NET-specific pagination link generation interfaces and implementations into an ASP.NET Core pagination namespace.
  • Change namespace of the pagination link generator interface to the ASP.NET Core pagination namespace
  • Change namespace of the concrete pagination link generator to the ASP.NET Core pagination namespace
  • Update ASP.NET Core service registration extension to use the new pagination namespace
framework/src/BBT.Aether.Application/BBT/Aether/Domain/Pagination/IPaginationLinkGenerator.cs
framework/src/BBT.Aether.AspNetCore/BBT/Aether/Domain/Pagination/PaginationLinkGenerator.cs
framework/src/BBT.Aether.AspNetCore/Microsoft/Extensions/DependencyInjection/AetherAspNetCoreModuleServiceCollectionExtensions.cs
Move core pagination models (PagedList, HateoasPagedList, PaginationLinks) into a shared core pagination namespace.
  • Relocate HateoasPagedList from the domain repositories namespace to a core pagination namespace
  • Relocate PagedList from the domain repositories namespace to a core pagination namespace
  • Relocate PaginationLinks from application DTOs to a core pagination namespace
framework/src/BBT.Aether.Domain/BBT/Aether/Domain/Repositories/HateoasPagedList.cs
framework/src/BBT.Aether.Domain/BBT/Aether/Domain/Repositories/PagedList.cs
framework/src/BBT.Aether.Application/BBT/Aether/Application/Dtos/PaginationLinks.cs
Adjust application contracts to reference the updated pagination and domain namespaces.
  • Add using for the root domain namespace in the read-only application service contract
  • Leave repository namespace usage intact while accommodating new pagination type locations
framework/src/BBT.Aether.Application/BBT/Aether/Application/Contracts/IReadOnlyAppService.cs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@yilmaztayfun yilmaztayfun merged commit 90b2c5e into release-v1.0 Dec 1, 2025
1 of 4 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Dec 1, 2025

Caution

Review failed

The pull request is closed.

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'review'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

This PR reorganizes pagination-related types across the codebase by relocating them to more appropriate namespaces. Pagination interfaces and classes are moved from Domain-specific namespaces to Core and AspNetCore layers, with corresponding using directives updated throughout.

Changes

Cohort / File(s) Change Summary
Pagination Types Migration to AspNetCore
framework/src/BBT.Aether.AspNetCore/BBT/Aether/AspNetCore/Pagination/IPaginationLinkGenerator.cs, framework/src/BBT.Aether.AspNetCore/BBT/Aether/AspNetCore/Pagination/PaginationLinkGenerator.cs
Namespace moved from BBT.Aether.Domain.Pagination to BBT.Aether.AspNetCore.Pagination; unused BBT.Aether.Domain.Repositories using directive removed
Core Pagination Types Consolidation
framework/src/BBT.Aether.Core/BBT/Aether/Pagination/HateoasPagedList.cs, framework/src/BBT.Aether.Core/BBT/Aether/Pagination/PagedList.cs, framework/src/BBT.Aether.Core/BBT/Aether/Pagination/PaginationLinks.cs
Namespace relocated to root BBT.Aether namespace (from BBT.Aether.Domain.Repositories and BBT.Aether.Application.Dtos)
Using Directive Updates
framework/src/BBT.Aether.Application/BBT/Aether/Application/Contracts/IReadOnlyAppService.cs, framework/src/BBT.Aether.AspNetCore/Microsoft/Extensions/DependencyInjection/AetherAspNetCoreModuleServiceCollectionExtensions.cs
Updated using directives to reference new pagination namespaces; added BBT.Aether.Domain import where needed

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Areas of focus:
    • Verify all namespace declarations are correct across all six affected files
    • Confirm no orphaned references to old namespace paths exist in the codebase
    • Check that all using directives align with the new namespace structure in dependent code

Possibly related PRs

Suggested reviewers

  • tsimsekburgan
  • middt

Poem

🐰 Hop, hop! The namespaces dance and align,
Pagination types find their proper line,
From Domain deep to Core so bright,
AspNetCore gleams in layered light,
Order restored with each using, so fine!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hateoas-pagination

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1c72682 and 73e2e18.

📒 Files selected for processing (7)
  • framework/src/BBT.Aether.Application/BBT/Aether/Application/Contracts/IReadOnlyAppService.cs (1 hunks)
  • framework/src/BBT.Aether.AspNetCore/BBT/Aether/AspNetCore/Pagination/IPaginationLinkGenerator.cs (1 hunks)
  • framework/src/BBT.Aether.AspNetCore/BBT/Aether/AspNetCore/Pagination/PaginationLinkGenerator.cs (1 hunks)
  • framework/src/BBT.Aether.AspNetCore/Microsoft/Extensions/DependencyInjection/AetherAspNetCoreModuleServiceCollectionExtensions.cs (1 hunks)
  • framework/src/BBT.Aether.Core/BBT/Aether/Pagination/HateoasPagedList.cs (1 hunks)
  • framework/src/BBT.Aether.Core/BBT/Aether/Pagination/PagedList.cs (1 hunks)
  • framework/src/BBT.Aether.Core/BBT/Aether/Pagination/PaginationLinks.cs (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello @yilmaztayfun, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request undertakes a significant refactoring effort to improve the architectural organization of pagination-related components. By strategically relocating classes and interfaces to more appropriate projects and namespaces, the change aims to enhance the separation of concerns within the codebase. This reorganization ensures that ASP.NET Core-specific pagination logic resides within the AspNetCore layer, while fundamental pagination data models are consolidated into the Core project, ultimately leading to a more modular and maintainable system.

Highlights

  • Refactored Pagination Link Generation: The IPaginationLinkGenerator interface and its implementation PaginationLinkGenerator have been moved from BBT.Aether.Application to the BBT.Aether.AspNetCore project, aligning them with ASP.NET Core specific functionalities and updating their namespaces accordingly.
  • Centralized Core Pagination Models: Core pagination classes such as HateoasPagedList, PagedList, and PaginationLinks have been relocated from BBT.Aether.Domain and BBT.Aether.Application.Dtos to the BBT.Aether.Core project, with their namespaces simplified to BBT.Aether for better modularity and a clearer separation of concerns.
  • Updated Namespace References: All affected using directives and namespace references across the codebase have been updated to reflect the new locations of the moved pagination components, ensuring compilation and correct functionality throughout the application.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • In IReadOnlyAppService, the new using BBT.Aether.Domain; doesn't match the updated namespaces for PagedList, HateoasPagedList, or PaginationLinks (now under BBT.Aether), so double-check the usings there to ensure the correct types are being referenced.
  • The moved pagination types now live under BBT.Aether while the files are in a Pagination folder; consider using a more specific namespace (e.g., BBT.Aether.Pagination) for consistency and clearer separation of concerns.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `IReadOnlyAppService`, the new `using BBT.Aether.Domain;` doesn't match the updated namespaces for `PagedList`, `HateoasPagedList`, or `PaginationLinks` (now under `BBT.Aether`), so double-check the usings there to ensure the correct types are being referenced.
- The moved pagination types now live under `BBT.Aether` while the files are in a `Pagination` folder; consider using a more specific namespace (e.g., `BBT.Aether.Pagination`) for consistency and clearer separation of concerns.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors pagination-related classes into more appropriate projects and namespaces, which is a good step towards better separation of concerns. However, the refactoring seems incomplete, as several files are now missing necessary using statements or have incorrect ones, which will lead to compilation errors. I've pointed these out as critical issues. Additionally, I've provided some suggestions to align the new namespaces with the folder structure, which is a common convention that improves code maintainability.

using System.Collections.Generic;
using System.Threading.Tasks;
using BBT.Aether.Application.Dtos;
using BBT.Aether.Domain;

Choose a reason for hiding this comment

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

critical

This using statement is incorrect for resolving PagedList<TEntity>. After the refactoring, PagedList is in a new namespace, which will cause a compilation error. Please update it to the correct namespace.

As per my other review comments, I recommend using BBT.Aether.Pagination as the new namespace for the moved pagination classes.

using BBT.Aether.Pagination;

@@ -1,8 +1,7 @@
using System.Collections.Generic;
using BBT.Aether.Application.Dtos;

Choose a reason for hiding this comment

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

critical

This file is missing a using statement for the refactored pagination types (PaginationLinks, HateoasPagedList<T>, PagedList<T>), which will cause compilation errors. Please add the correct using statement.

Following my suggestion to use a BBT.Aether.Pagination namespace for these types, the required statement is as follows.

using BBT.Aether.Application.Dtos;
using BBT.Aether.Pagination;

using System.Text;
using BBT.Aether.Application.Dtos;
using BBT.Aether.Domain.Repositories;
using Microsoft.AspNetCore.Http;

Choose a reason for hiding this comment

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

critical

This file is missing a using statement for the refactored pagination types (PaginationLinks, HateoasPagedList<T>, PagedList<T>), which will cause compilation errors. Please add the correct using statement.

Following my suggestion to use a BBT.Aether.Pagination namespace for these types, the required statement should be added.

using Microsoft.AspNetCore.Http;
using BBT.Aether.Pagination;

using System.Collections.Generic;

namespace BBT.Aether.Domain.Repositories;
namespace BBT.Aether;

Choose a reason for hiding this comment

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

medium

For better code organization and to follow common .NET conventions, it's recommended that namespaces match the folder structure. Since this file is located in the Pagination folder, consider changing the namespace to BBT.Aether.Pagination. This would apply to the other moved pagination-related classes as well.

namespace BBT.Aether.Pagination;

using System.Collections.Generic;

namespace BBT.Aether.Domain.Repositories;
namespace BBT.Aether;

Choose a reason for hiding this comment

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

medium

To maintain consistency and follow the convention of matching namespaces with folder structure, this namespace should be BBT.Aether.Pagination.

namespace BBT.Aether.Pagination;

@@ -1,4 +1,4 @@
namespace BBT.Aether.Application.Dtos;
namespace BBT.Aether;

Choose a reason for hiding this comment

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

medium

To maintain consistency and follow the convention of matching namespaces with folder structure, this namespace should be BBT.Aether.Pagination.

namespace BBT.Aether.Pagination;

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 1, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants