{"id":20643653,"url":"https://github.com/bitzart/pagination","last_synced_at":"2025-04-16T02:04:35.252Z","repository":{"id":38302321,"uuid":"342917042","full_name":"BitzArt/Pagination","owner":"BitzArt","description":"A lightweight library to easily create pages of items. Works with (or without) EF Core to paginate db requests.","archived":false,"fork":false,"pushed_at":"2025-03-09T15:34:21.000Z","size":133,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-16T02:04:19.259Z","etag":null,"topics":["csharp","dotnet","efcore","entity-framework-core","enumerable","pagination","paging"],"latest_commit_sha":null,"homepage":"","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/BitzArt.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":"2021-02-27T17:32:55.000Z","updated_at":"2025-03-09T15:35:52.000Z","dependencies_parsed_at":"2024-11-16T16:13:36.624Z","dependency_job_id":"2c10558b-6a15-4c05-bb04-24164e2c5ecd","html_url":"https://github.com/BitzArt/Pagination","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitzArt%2FPagination","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitzArt%2FPagination/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitzArt%2FPagination/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitzArt%2FPagination/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BitzArt","download_url":"https://codeload.github.com/BitzArt/Pagination/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249183104,"owners_count":21226141,"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","efcore","entity-framework-core","enumerable","pagination","paging"],"created_at":"2024-11-16T16:13:31.426Z","updated_at":"2025-04-16T02:04:35.204Z","avatar_url":"https://github.com/BitzArt.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pagination\n\n![Tests](https://github.com/BitzArt/Pagination/actions/workflows/Tests.yml/badge.svg)\n\n# Overview\n\nThis Pagination NuGet package provides efficient pagination capabilities for your C# projects, enabling you to display large data sets conveniently.\n\n# Installation\n\n## Use with IEnumerable\n\nTo use this package with **IEnumerable** collections, follow these steps:\n\n\u003col\u003e\n\u003cli\u003e\nInstall the package using the .NET CLI:\n\n```\ndotnet add package BitzArt.Pagination\n```\n\u003c/li\u003e\n\u003cli\u003e\nUse it by calling the ToPage method on your collections:\n\n```csharp\nvar page = yourEnumerable.ToPage(offset, limit);\n```\n\u003c/li\u003e\n\u003c/ol\u003e\n\n## Use with Entity Framework Core\n\nFor Entity Framework Core projects, you can easily integrate the Pagination package:\n\u003col\u003e\n\u003cli\u003e\nInstall the package:\n\n```\ndotnet add package BitzArt.Pagination.EntityFrameworkCore\n```\n\u003c/li\u003e\n\u003cli\u003e\nAssuming you have a DbContext with a DbSet of your entity type:\n\n```csharp\npublic class YourDbContext : DbContext\n{\n    public DbSet\u003cSomeEntity\u003e Items { get; set; }\n    // ...\n}\n\n```\n\u003c/li\u003e\n\u003cli\u003e\nUtilize the ToPageAsync method provided by the package to create paged results:\n\n```csharp\nvar dbContext = new YourDbContext();\nvar paginatedResult = await dbContext.Items.ToPageAsync(offset, limit);\n```\n\u003c/li\u003e\n\u003c/ol\u003e\n\n# Benefits\n\n- Simplifies the process of paginating data in your application.\n- Optimized for performance and memory efficiency.\n- Compatible with various data sources.\n- Ideal for scenarios where you need to display a portion of a large dataset at a time.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitzart%2Fpagination","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitzart%2Fpagination","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitzart%2Fpagination/lists"}