{"action":"created","comment":{"url":"https://api.github.com/repos/AlexM-Itu/Craigslist/pulls/comments/43605460","id":43605460,"diff_hunk":"@@ -17,17 +21,20 @@ public void PublishListing(Listing listing)\n \t\t\t}\n \t\t}\n \n-\t\tpublic List<Listing> GetListingsByCategoryId(long? categoryId)\n+\t\tpublic IPagedList<Craigslist.Domain.Entities.Listing> GetListingsByCategoryId(int? page, long? categoryId)\n \t\t{\n \t\t\tusing (var domain = new CraigslistDomain())\n \t\t\t{\n+                int pageSize = Convert.ToInt32(ConfigurationManager.AppSettings[\"pageSize\"]);\n+                int pageNumber = (page ?? 1);\n \t\t\t\treturn domain\n \t\t\t\t\t.Listings\n \t\t\t\t\t.Include(l => l.Category)\n \t\t\t\t\t.Include(\"Category.ParentCategory\")\n \t\t\t\t\t.Include(l => l.Contact)\n-\t\t\t\t\t.Where(listing => categoryId == null || listing.CategoryId == categoryId)\n-\t\t\t\t\t.ToList();\n+                    .Where(listing => categoryId == null || listing.CategoryId == categoryId)\n+                    .OrderBy(x => x.Created)","path":"Craigslist/Craigslist.Business/ListingsManager.cs","position":30,"original_position":30,"commit_id":"481a6d5a926696a6f3bdf543dcb02298187bf3c1","original_commit_id":"481a6d5a926696a6f3bdf543dcb02298187bf3c1","user":{"login":"AlexM-Itu","id":14856468,"avatar_url":"https://avatars.githubusercontent.com/u/14856468?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexM-Itu","html_url":"https://github.com/AlexM-Itu","followers_url":"https://api.github.com/users/AlexM-Itu/followers","following_url":"https://api.github.com/users/AlexM-Itu/following{/other_user}","gists_url":"https://api.github.com/users/AlexM-Itu/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexM-Itu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexM-Itu/subscriptions","organizations_url":"https://api.github.com/users/AlexM-Itu/orgs","repos_url":"https://api.github.com/users/AlexM-Itu/repos","events_url":"https://api.github.com/users/AlexM-Itu/events{/privacy}","received_events_url":"https://api.github.com/users/AlexM-Itu/received_events","type":"User","site_admin":false},"body":"for lambdas there're some naming conventions. Regularly they're called i, j, k or by first letter of the entity (l in my case means Listing) or by its full name (Listing). ","created_at":"2015-11-02T08:33:12Z","updated_at":"2015-11-02T08:33:12Z","html_url":"https://github.com/AlexM-Itu/Craigslist/pull/2#discussion_r43605460","pull_request_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/AlexM-Itu/Craigslist/pulls/comments/43605460"},"html":{"href":"https://github.com/AlexM-Itu/Craigslist/pull/2#discussion_r43605460"},"pull_request":{"href":"https://api.github.com/repos/AlexM-Itu/Craigslist/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/AlexM-Itu/Craigslist/pulls/2","id":49395176,"html_url":"https://github.com/AlexM-Itu/Craigslist/pull/2","diff_url":"https://github.com/AlexM-Itu/Craigslist/pull/2.diff","patch_url":"https://github.com/AlexM-Itu/Craigslist/pull/2.patch","issue_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/issues/2","number":2,"state":"open","locked":false,"title":"Added Pagination","user":{"login":"Shrutichhatbar","id":8922042,"avatar_url":"https://avatars.githubusercontent.com/u/8922042?v=3","gravatar_id":"","url":"https://api.github.com/users/Shrutichhatbar","html_url":"https://github.com/Shrutichhatbar","followers_url":"https://api.github.com/users/Shrutichhatbar/followers","following_url":"https://api.github.com/users/Shrutichhatbar/following{/other_user}","gists_url":"https://api.github.com/users/Shrutichhatbar/gists{/gist_id}","starred_url":"https://api.github.com/users/Shrutichhatbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shrutichhatbar/subscriptions","organizations_url":"https://api.github.com/users/Shrutichhatbar/orgs","repos_url":"https://api.github.com/users/Shrutichhatbar/repos","events_url":"https://api.github.com/users/Shrutichhatbar/events{/privacy}","received_events_url":"https://api.github.com/users/Shrutichhatbar/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-02T05:01:47Z","updated_at":"2015-11-02T08:33:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e65a39dd7dec844896289cfacb1328db6aed4f56","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/pulls/2/commits","review_comments_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/pulls/2/comments","review_comment_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/issues/2/comments","statuses_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/statuses/481a6d5a926696a6f3bdf543dcb02298187bf3c1","head":{"label":"AlexM-Itu:Paging","ref":"Paging","sha":"481a6d5a926696a6f3bdf543dcb02298187bf3c1","user":{"login":"AlexM-Itu","id":14856468,"avatar_url":"https://avatars.githubusercontent.com/u/14856468?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexM-Itu","html_url":"https://github.com/AlexM-Itu","followers_url":"https://api.github.com/users/AlexM-Itu/followers","following_url":"https://api.github.com/users/AlexM-Itu/following{/other_user}","gists_url":"https://api.github.com/users/AlexM-Itu/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexM-Itu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexM-Itu/subscriptions","organizations_url":"https://api.github.com/users/AlexM-Itu/orgs","repos_url":"https://api.github.com/users/AlexM-Itu/repos","events_url":"https://api.github.com/users/AlexM-Itu/events{/privacy}","received_events_url":"https://api.github.com/users/AlexM-Itu/received_events","type":"User","site_admin":false},"repo":{"id":43233332,"name":"Craigslist","full_name":"AlexM-Itu/Craigslist","owner":{"login":"AlexM-Itu","id":14856468,"avatar_url":"https://avatars.githubusercontent.com/u/14856468?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexM-Itu","html_url":"https://github.com/AlexM-Itu","followers_url":"https://api.github.com/users/AlexM-Itu/followers","following_url":"https://api.github.com/users/AlexM-Itu/following{/other_user}","gists_url":"https://api.github.com/users/AlexM-Itu/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexM-Itu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexM-Itu/subscriptions","organizations_url":"https://api.github.com/users/AlexM-Itu/orgs","repos_url":"https://api.github.com/users/AlexM-Itu/repos","events_url":"https://api.github.com/users/AlexM-Itu/events{/privacy}","received_events_url":"https://api.github.com/users/AlexM-Itu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlexM-Itu/Craigslist","description":"Project for SWE 500 Class","fork":false,"url":"https://api.github.com/repos/AlexM-Itu/Craigslist","forks_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/forks","keys_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/teams","hooks_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/hooks","issue_events_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/issues/events{/number}","events_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/events","assignees_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/assignees{/user}","branches_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/branches{/branch}","tags_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/tags","blobs_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/statuses/{sha}","languages_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/languages","stargazers_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/stargazers","contributors_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/contributors","subscribers_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/subscribers","subscription_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/subscription","commits_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/contents/{+path}","compare_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/merges","archive_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/downloads","issues_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/issues{/number}","pulls_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/pulls{/number}","milestones_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/milestones{/number}","notifications_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/labels{/name}","releases_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/releases{/id}","created_at":"2015-09-27T03:49:21Z","updated_at":"2015-10-11T01:30:08Z","pushed_at":"2015-11-02T08:14:36Z","git_url":"git://github.com/AlexM-Itu/Craigslist.git","ssh_url":"git@github.com:AlexM-Itu/Craigslist.git","clone_url":"https://github.com/AlexM-Itu/Craigslist.git","svn_url":"https://github.com/AlexM-Itu/Craigslist","homepage":null,"size":542,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"AlexM-Itu:master","ref":"master","sha":"911e122f486107ed1f40a49dd813b4e60eed5652","user":{"login":"AlexM-Itu","id":14856468,"avatar_url":"https://avatars.githubusercontent.com/u/14856468?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexM-Itu","html_url":"https://github.com/AlexM-Itu","followers_url":"https://api.github.com/users/AlexM-Itu/followers","following_url":"https://api.github.com/users/AlexM-Itu/following{/other_user}","gists_url":"https://api.github.com/users/AlexM-Itu/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexM-Itu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexM-Itu/subscriptions","organizations_url":"https://api.github.com/users/AlexM-Itu/orgs","repos_url":"https://api.github.com/users/AlexM-Itu/repos","events_url":"https://api.github.com/users/AlexM-Itu/events{/privacy}","received_events_url":"https://api.github.com/users/AlexM-Itu/received_events","type":"User","site_admin":false},"repo":{"id":43233332,"name":"Craigslist","full_name":"AlexM-Itu/Craigslist","owner":{"login":"AlexM-Itu","id":14856468,"avatar_url":"https://avatars.githubusercontent.com/u/14856468?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexM-Itu","html_url":"https://github.com/AlexM-Itu","followers_url":"https://api.github.com/users/AlexM-Itu/followers","following_url":"https://api.github.com/users/AlexM-Itu/following{/other_user}","gists_url":"https://api.github.com/users/AlexM-Itu/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexM-Itu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexM-Itu/subscriptions","organizations_url":"https://api.github.com/users/AlexM-Itu/orgs","repos_url":"https://api.github.com/users/AlexM-Itu/repos","events_url":"https://api.github.com/users/AlexM-Itu/events{/privacy}","received_events_url":"https://api.github.com/users/AlexM-Itu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlexM-Itu/Craigslist","description":"Project for SWE 500 Class","fork":false,"url":"https://api.github.com/repos/AlexM-Itu/Craigslist","forks_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/forks","keys_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/teams","hooks_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/hooks","issue_events_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/issues/events{/number}","events_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/events","assignees_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/assignees{/user}","branches_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/branches{/branch}","tags_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/tags","blobs_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/statuses/{sha}","languages_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/languages","stargazers_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/stargazers","contributors_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/contributors","subscribers_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/subscribers","subscription_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/subscription","commits_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/contents/{+path}","compare_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/merges","archive_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/downloads","issues_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/issues{/number}","pulls_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/pulls{/number}","milestones_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/milestones{/number}","notifications_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/labels{/name}","releases_url":"https://api.github.com/repos/AlexM-Itu/Craigslist/releases{/id}","created_at":"2015-09-27T03:49:21Z","updated_at":"2015-10-11T01:30:08Z","pushed_at":"2015-11-02T08:14:36Z","git_url":"git://github.com/AlexM-Itu/Craigslist.git","ssh_url":"git@github.com:AlexM-Itu/Craigslist.git","clone_url":"https://github.com/AlexM-Itu/Craigslist.git","svn_url":"https://github.com/AlexM-Itu/Craigslist","homepage":null,"size":542,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AlexM-Itu/Craigslist/pulls/2"},"html":{"href":"https://github.com/AlexM-Itu/Craigslist/pull/2"},"issue":{"href":"https://api.github.com/repos/AlexM-Itu/Craigslist/issues/2"},"comments":{"href":"https://api.github.com/repos/AlexM-Itu/Craigslist/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/AlexM-Itu/Craigslist/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/AlexM-Itu/Craigslist/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AlexM-Itu/Craigslist/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/AlexM-Itu/Craigslist/statuses/481a6d5a926696a6f3bdf543dcb02298187bf3c1"}}}}