{"id":24540034,"url":"https://github.com/ozakboy/ozakboy.pagedata","last_synced_at":"2026-03-06T16:31:00.859Z","repository":{"id":110823859,"uuid":"474555012","full_name":"ozakboy/ozakboy.PageData","owner":"ozakboy","description":"A lightweight and flexible pagination library for .NET applications, supporting List\u003cT\u003e, IQueryable\u003cT\u003e, and IEnumerable\u003cT\u003e with easy-to-use extension methods.","archived":false,"fork":false,"pushed_at":"2024-11-23T09:28:40.000Z","size":838,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T02:19:07.692Z","etag":null,"topics":["csharp","dotnet","ef-core","library","linq","net6","net7","net8","netcore","nuget","pagination","pagination-library"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/Ozakboy.PageData","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozakboy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-27T06:31:50.000Z","updated_at":"2024-11-23T11:53:17.000Z","dependencies_parsed_at":"2024-11-23T08:22:44.403Z","dependency_job_id":"3ee5b975-05f0-4610-857f-8848515e3ab1","html_url":"https://github.com/ozakboy/ozakboy.PageData","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozakboy%2Fozakboy.PageData","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozakboy%2Fozakboy.PageData/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozakboy%2Fozakboy.PageData/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozakboy%2Fozakboy.PageData/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozakboy","download_url":"https://codeload.github.com/ozakboy/ozakboy.PageData/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249019869,"owners_count":21199444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","dotnet","ef-core","library","linq","net6","net7","net8","netcore","nuget","pagination","pagination-library"],"created_at":"2025-01-22T17:18:10.091Z","updated_at":"2026-03-06T16:31:00.813Z","avatar_url":"https://github.com/ozakboy.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ozakboy.PageData\n\n[![nuget](https://img.shields.io/badge/nuget-ozakboy.PageData-blue)](https://www.nuget.org/packages/Ozakboy.PageData/) \n[![github](https://img.shields.io/badge/github-ozakboy.PageData-blue)](https://github.com/ozakboy/ozakboy.PageData)\n\n[English](README.md) | [繁體中文](README_zh-TW.md) \n\nA lightweight and flexible pagination library for .NET applications. Easily implement pagination functionality in your applications with support for various data sources including Lists, IQueryable, and IEnumerable.\n\n## Features\n\n- Simple and intuitive pagination implementation\n- Support for multiple data source types (List\u003cT\u003e, IQueryable\u003cT\u003e, IEnumerable\u003cT\u003e)\n- Flexible page size configuration\n- Complete paging information\n- Data transformation support\n- Extension methods for easy integration\n- Compatible with Entity Framework Core queries\n\n## Installation\n\nInstall via NuGet Package Manager:\n\n```bash\nInstall-Package Ozakboy.PageData\n```\n\nOr via .NET CLI:\n\n```bash\ndotnet add package Ozakboy.PageData\n```\n\n## Supported Frameworks\n\n- .NET 6.0\n- .NET 7.0\n- .NET 8.0\n\n## Core Components\n\n### 1. PageInfo\nContains basic pagination information:\n- Current page number\n- Items per page (Limit)\n- Total items count\n- Total pages\n\n### 2. VPageData\u003cT\u003e\nGeneric class that holds:\n- Paginated data (List\u003cT\u003e)\n- Page information (PageInfo)\n\n### 3. ASearchPageInfo\nAbstract base class for search parameters:\n- Base page number property\n- Default limit (items per page) property\n\n## Usage Examples\n\n### Basic Usage\n\n```csharp\nusing Ozakboy.PageData;\n\n// With List\u003cT\u003e\nvar myList = new List\u003cstring\u003e() { \"item1\", \"item2\", \"item3\", ... };\nvar pagedResult = myList.ToPageData(page: 1, limit: 10);\n\n// With IQueryable (e.g., Entity Framework)\nvar query = dbContext.Users.Where(u =\u003e u.IsActive);\nvar pagedUsers = query.ToPageData(page: 1, limit: 10);\n\n// With IEnumerable\nIEnumerable\u003cProduct\u003e products = GetProducts();\nvar pagedProducts = products.ToPageData(page: 1, limit: 10);\n```\n\n### With Data Transformation\n\n```csharp\nvar pagedResult = query.ToPageData(1, 10)\n    .Select(user =\u003e new UserDto \n    {\n        Id = user.Id,\n        Name = user.Name\n    });\n```\n\n### Custom Search Parameters\n\n```csharp\npublic class UserSearchParams : ASearchPageInfo\n{\n    public string? SearchName { get; set; }\n    public bool? IsActive { get; set; }\n}\n\n// Usage\nvar searchParams = new UserSearchParams \n{\n    Page = 1,\n    Limit = 10,\n    SearchName = \"John\"\n};\n```\n\n### Accessing Page Information\n\n```csharp\nvar result = query.ToPageData(1, 10);\n\nConsole.WriteLine($\"Current Page: {result.PageInfo.Page}\");\nConsole.WriteLine($\"Items Per Page: {result.PageInfo.Limit}\");\nConsole.WriteLine($\"Total Items: {result.PageInfo.Total}\");\nConsole.WriteLine($\"Total Pages: {result.PageInfo.TotalPage}\");\n```\n\n## Extension Methods\n\nThe library provides several extension methods through `ToPageDataExtensions`:\n\n- `ToPageData\u003cT\u003e(this List\u003cT\u003e, int page, int limit)`\n- `ToPageData\u003cT\u003e(this List\u003cT\u003e, int page, int limit, int total)`\n- `ToPageData\u003cT\u003e(this IQueryable\u003cT\u003e, int page, int limit)`\n- `ToPageData\u003cT\u003e(this IQueryable\u003cT\u003e, int page, int limit, int total)`\n- `ToPageData\u003cT\u003e(this IEnumerable\u003cT\u003e, int page, int limit)`\n- `ToPageData\u003cT\u003e(this IEnumerable\u003cT\u003e, int page, int limit, int total)`\n\n## License\n\nThis project is licensed under the terms specified in the LICENSE file.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Author\n\n- ozakboy\n\n## Support\n\nIf you encounter any issues or have questions, please file an issue on the GitHub repository.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozakboy%2Fozakboy.pagedata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozakboy%2Fozakboy.pagedata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozakboy%2Fozakboy.pagedata/lists"}