{"id":16294688,"url":"https://github.com/valve/aspirator","last_synced_at":"2025-10-07T02:10:35.565Z","repository":{"id":141772896,"uuid":"2087453","full_name":"Valve/aspirator","owner":"Valve","description":"Easy to use ASP.NET MVC paginator","archived":false,"fork":false,"pushed_at":"2011-08-06T19:00:38.000Z","size":2912,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-04T20:57:48.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Valve.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-07-22T06:36:09.000Z","updated_at":"2019-04-05T17:46:03.000Z","dependencies_parsed_at":"2023-03-12T07:16:07.293Z","dependency_job_id":null,"html_url":"https://github.com/Valve/aspirator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Valve/aspirator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valve%2Faspirator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valve%2Faspirator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valve%2Faspirator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valve%2Faspirator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Valve","download_url":"https://codeload.github.com/Valve/aspirator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valve%2Faspirator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278708004,"owners_count":26031932,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-10T20:16:08.420Z","updated_at":"2025-10-07T02:10:35.550Z","avatar_url":"https://github.com/Valve.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aspirator \nAspirator is an easy to use paginator, written for ASP.NET MVC.\nIt was inspired by [will_paginate] plugin from Ruby-on-Rails.\n\nQuick install:\n\nThe easiest way to install is via nuget.\n\n```c-sharp\ninstall-package aspirator.mvc3\n```\n\nThis will install the package and add the library reference.\nNote that the [nuget package][nuget_package] references the ASP.NET MVC 3 assembly.\n\n## Basic usage\n\nAspirator works with any collection that implements the [IQueryable\u0026lt;T\u0026gt;][iqueryable] interface.\nThe [IQueryable\u0026lt;T\u0026gt;][iqueryable] is required to load only the displayed rows from the DB.\n\n\nDefine your list view model that will be used in views.\n\n``` java\npublic class RegionsList : PagedList\u003cRegion\u003e {\n\tpublic RegionsList(IQueryable\u003cRegion\u003e source, int index, int pageSize)\n\t    : base(source, index, pageSize) {\n\t}\n}\n```\n\nController code\n\n``` java\npublic ViewResult Index(int? page, int pageSize = 10) {\n    return View(new RegionsList(db.Regions.OrderBy(x=\u003ex.Id), page - 1 ?? 0, pageSize));\n}\n```\n\nView code\n\n``` c-sharp\n@using KiP.Web.Mvc.Pagination\n```\n\n``` razor\n@Html.Pager(Model)\n```\n\nThe paging links will look as follows:\n\n```\n← 1 2 3 4 5 6 7 8 9 →\n```\n\nThere are various customizations available, accessible via parameters to Pager extension method: \n\nFor details, see [customization][wiki_customization] wiki.\n\n### Licence\n\nThis code is [MIT][mit] licenced:\n\nCopyright (c) 2011 Valentin Vasilyev\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n[nuget_package]: http://nuget.org/List/Packages/Aspirator.MVC3\n[iqueryable]: http://msdn.microsoft.com/en-us/library/system.linq.iqueryable.aspx\n[mit]: http://www.opensource.org/licenses/mit-license.php\n[will_paginate]: https://github.com/mislav/will_paginate\n[wiki_customization]: https://github.com/Valve/aspirator/wiki/Aspirator-customization","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalve%2Faspirator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalve%2Faspirator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalve%2Faspirator/lists"}